They say that everyone is entitled to an opinion. At least in the election off-years.
consider how to evaluate 3+ 4/(5+1/0). Would you say that was equal to 3, or would you make the system barf? RJF On Oct 10, 10:11 am, Burcin Erocal <[EMAIL PROTECTED]> wrote: > On Fri, 10 Oct 2008 23:11:04 +1100 > > > > "Alex Ghitza" <[EMAIL PROTECTED]> wrote: > > The following looks ok (see comments below, however): > > > sage: 1/RR(0) > > +infinity > > sage: RR(0)^(-1) > > +infinity > > > But how about this? > > > sage: 1/CC(0) > > NaN - NaN*I > > sage: CC(0)^(-1) > > ZeroDivisionError... > > > I don't really like either of these; I guess I would prefer the > > answer to be UnsignedInfinity in both cases. For that matter, I'm > > not quite sure why 1/RR(0) is +infinity rather than -infinity, so I > > guess I would prefer for *that* to be UnsignedInfinity as well. > > > On the other hand, I don't really use this sort of thing every day, > > so maybe someone who's closer to this issue can chime in. > > I don't use this either, but here's my opinion anyway. :) > > I think division by zero should always raise an error. When you obtain > infinity in an expression, you shouldn't expect a meaningful result > from your computation anyway. If you expect infinity in your > computation, you can ignore the exception, but I believe in most cases, > this will indicate an error. > > Note that this is different from evaluating an expression like > 1/gamma(-1) to 0, which we already handle properly (IMHO). > > This might also be a good place to discuss if #2515 should be marked as > invalid. > > Cheers, > > Burcin --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---