On Friday, September 26, 2014 10:46:08 AM UTC+1, Peter Bruin wrote:

> To be honest, I tend to agree with this argument.  Once you start defining 
> arithmetic with infinity, you are asking for trouble because there isn't 
> one set of semantics that is valid in all or even most cases; you are also 
> forced to either introduce NaN or accept that arithmetic operations may 
> throw errors, etc.
>

And that is a good thing! If you have to check before every operation that 
the input is acceptable then you litter your code with if branches that 
make it hard to follow what you are actually doing. Separating the error 
handling from the actual algorithm is a basic programming pattern...

One thing that does make this case a little more difficult is the fact that 
> Denis Simon's scripts are not updated very frequently.  On the positive 
> side, the functionality of these scripts is gradually being moved into the 
> PARI library.
>
> In this case I would prefer to make a few simple changes to Simon's code 
> instead of introducing arithmetic with infinity just to fix this problem.
>

So even if upstream never comes around with infinities, we can always 
remove the infinities patch once the scripts have been updated.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to