On Thu, Oct 22, 2009 at 4:52 PM, John H Palmieri <jhpalmier...@gmail.com> wrote:
>
>
>
> On Oct 22, 4:15 pm, Fredrik Johansson <fredrik.johans...@gmail.com>
> wrote:
>> 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"?
>
> First, it's what I've always been taught, and I trust my teachers and
> professors -- if they were doing something unusual or something about
> which there was some controversy, they would mention it.  For some
> more evidence, for example, in the article cited by Francis Clarke,
> Knuth notes on p. 407 that Cauchy said that 0^0 was undefined.  There
> were a few flawed attempts to explain that 0^0 = 1, after which, "The
> debate stopped there [in 1834], apparently with the conclusion that
> 0^0 should be undefined."  I interpret this as saying that, based on
> the historical record, 0^0 is undefined.  Knuth then proceeds to argue
> that this is the wrong convention, but the whole reason he has to work
> so hard is because 0^0 being undefined *is* the standard.

Well like it or not, it is a fact that 0.0^0.0 = 1 *is* the official
ISO 99 standard.  Note that ISO = "international standards
organization".

I'm not making an argument here for or against this.  But there is no
arguing with it being an official standard as dictated by an
international standards organization for perhaps the worlds most
popular programming language (C/C++).   I know nothing of why they
made that choice.

Here's an IEEE page spelling this out too:

  http://www.opengroup.org/onlinepubs/009695399/functions/pow.html

William

William

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to