On Fri, Oct 23, 2009 at 12:51 AM, John H Palmieri <jhpalmier...@gmail.com> wrote: > > On Oct 22, 2:14 pm, William Stein <wst...@gmail.com> wrote: >> On Thu, Oct 22, 2009 at 2:02 PM, John H Palmieri <jhpalmier...@gmail.com> >> wrote: >> >> >> > On Oct 22, 8:57 am, William Stein <wst...@gmail.com> wrote: >> >> On Thu, Oct 22, 2009 at 8:11 AM, John H Palmieri <jhpalmier...@gmail.com> >> >> wrote: >> >> >> > Anyway, 0^0 is undefined in mathematics, so it's good that it's >> >> > undefined in Sage. >> >> >> It's defined for Sage *integers*: >> >> >> sage: 0^0 >> >> 1 >> >> > What about: >> >> > sage: 0.000^0.000 >> > 1.00000000000000 >> >> > Shouldn't this be undefined? >> >> > John >> >> Sage's behavior for 0.0^0.0 is determined by MPFR's, and MPFR follows >> "the ISO C99 standard for the pow function" as explained here: >> >> http://www.mpfr.org/mpfr-current/mpfr.html >> >> In particular, see the rule that "pow(x, ±0) returns 1 for any x, even >> a NaN." Indeed: >> >> sage: RR('NaN')^0 >> 1.00000000000000 > > Wow, I thought Sage did math. The mathematical standard for 0^0 (for > real numbers) is that it doesn't exist, right? Or did I miss a memo > somewhere? What about these:
What do you mean by "mathematical standard"? A perfectly valid view is that 0^0 = 1 and that the function f(x,y) = x^y simply is discontinuous. > sage: CC(0)^CC(0) > NaN - NaN*I > sage: 0^CC(0) > NaN - NaN*I > sage: CC(0)^0 > ArithmeticError: 0^0 is undefined. > sage: CC(Infinity)^0 > 1.00000000000000 > sage: CC(Infinity)^CC(0) > NaN - NaN*I The inconsistency is surely not good. Fredrik --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---