On 8/28/07, Stephen Forrest <[EMAIL PROTECTED]> wrote:
> On 8/28/07, William Stein <[EMAIL PROTECTED]> wrote:
> >
> > In SAGE until now 0^0 gave 1 as answer.  We are almost certainly going to 
> > change
> > this to raise an ArithmeticError.  Does anybody have any strong
> > feelings about this?
> > By the way, Magma, PARI, Gap, and Maple all give 1 as the output for 0^0.
> > Mathematica and Maxima both raise an error.
>
> [I just recently joined this list; please forgive my ignorance about
> the details of SAGE.]
>
> What will be the result if one or more of the operands are
> floating-point zeroes rather than integer zeroes?
>
> Maple gives 0^0=1 for integral inputs, but 0.^0. (note the decimal
> place indicating a float input) simplifies to the symbolic quantity
> 'Float(undefined)'.  It is my understanding that this discrepancy
> between integers and floats was maintained out of a desire to keep
> float operations conforming to IEEE 754.  In neither case does the
> operation raise an error.
>
> If 0.^0. in SAGE (however that's expressed) also raises an
> ArithmeticError, it may be worth investigating whether raising an
> error under these circumstances is consistent with IEEE 754, if such
> consistency is desired in SAGE.

Good point.

This came up in the context of implementing generic powering,
when there is no other special implementation of powering available.
Perhaps the right solution is to raise an error generically, but not
raise an error when a special implementation (for particular numbers)
provides some meaning (e.g., IEEE arithmetic).

William

--~--~---------~--~----~------------~-------~--~----~
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://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to