It's defined for Sage *integers*:
sage: 0^0
1
Among other reasons, this is for compatibility with Python and many,
many other programs:
sage: int(0)^int(0)
1
sage: maple('0^0')
1
sage: gap('0^0')
1
sage: gp('0^0')
1
William
Even for discrete things like elements of GF(5)? I haven't thought
about what 0^0 is for things where the continuous limit doesn't make sense.
Jason
--
Jason Grout
In analysis 0^0 is undefined because it's a undefined limit:
un^vn = exp(un * log vn).
Try with un=1/n et vn=1/n and limit un^vn == 1
But for un=a/log n -> 0 and vn=1/n -> 0 un*log vn =-a and un^vn ->
e^(-a) != 1.
...
I think I've seen this discussion before. Categories!
Martin
I know of at least one case where 0^0 needs to be undefined in order to
get the right answer to a problem. In Mechanics of Solids, there are
singularity functions where,
<x-a>^n = 0 , x < a
= (x-a)^n , x >= a
if n > 0. n = 0 gives the Heaviside function, n = -1 is the Dirac delta
and n = -2 is the unit doublet which is the derivative of the delta
function.
There's also integration rules, but they're unimportant for this
discussion.
So, 0^0 amounts to defining that the Heaviside function = 1 at x = a.
I prefer
to think of it as undefined and define it strictly in terms of left
and right
limits.
Cheers,
Tim.
---
Tim Lahey
PhD Candidate, Systems Design Engineering
University of Waterloo
http://www.linkedin.com/in/timlahey
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
William
-- William
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
For what it is worth,
Mathematica 7.0 for Sun Solaris SPARC (64-bit)
Copyright 1988-2009 Wolfram Research, Inc.
In[1]:= 0^0
0
Power::indet: Indeterminate expression 0 encountered.
Out[1]= Indeterminate
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
I just mentioned "0^0" to my wife (a Biologist), and she instantly
said "it doesn't exist".
William
>
> On Oct 22, 5:11 pm, William Stein <wst...@gmail.com> wrote:
>> 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++).
>
> There is a question about whether we, as mathematicians, should
> automatically accept as standards something designated for use in a
> programming language. I know that Sage is a programming environment,
> but shouldn't it reflect mathematical truth, not computer programming
> standards?
I actually remember going through and fixing a whole bunch of rings
that didn't raise errors on 0^0--most of them were just an oversight.
(I think Tom Boothby was there too...) For Integers this was
explicitly changed back to be like Python and MPFR http://hg.sagemath.org/sage-main/diff/fa97eed25973/sage/rings/integer.pyx
. I'd rather have an error in most cases (especially for finite
fields) but consistency with the (Python) environment does have its
merits, if just to reduce confusion.
- Robert
indeed. Note that one gets the same results in C:
#include <stdio.h>
#include <math.h>
int
main ()
{
double x = 0.0;
double y = 0.0;
double z = pow (x, y);
printf ("%f^%f=%f\n", x, y, z);
}
patate% gcc e.c -o e -lm
patate% ./e
0.000000^0.000000=1.000000
Paul Zimmermann
PS: Maple is inconsistent here:
|\^/| Maple 10 (IBM INTEL LINUX)
._|\| |/|_. Copyright (c) Maplesoft, a division of Waterloo Maple Inc. 2005
\ MAPLE / All rights reserved. Maple is a trademark of
<____ ____> Waterloo Maple Inc.
| Type ? for help.
> 0^0;
1
> 0.0^0.0;
Float(undefined)
By co-incidence, the latest Parabola[1] arrived yesterday and it
includes a discussion by Michael Deakin[2] on this (along with "is 1
prime" and "is 0 a natural number". He states that traditionally,
Euler, Pfaff and Mobius held that 0^0 == 1, whilst Cauchy, Libri and
two anonymous authors held that 0^0 is undefined, with the latter camp
"winning". Starting in 1970, Vaughan and Knuth joined the debate in
the former camp and the article concludes that 0^0 == 1 is now the
preferred convention. (The article includes the mathematical
arguments the various proponents used).
>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".
Likewise the ISO APL standard also defines 0*0 as 1 ('*' is the
power operator in APL). I'm not sure what the FORTRAN standard
says.
These standards all relate to the power operator in specific
programming languages and don't necessarily reflect mathematical
conventions as programming languages have limitations that pure
mathematics doesn't. A review of the relevant working group
debates might shed some light on their reasoning.
[1] "Parabola incorporating Function, a mathematics magazine for
secondary schools", ISSN 1446-9723
http://www.maths.unsw.edu.au/highschool/parabola.html
[2] Adjunct Senior Research Fellow in Mathematics & Statistics at
Monash University.
--
Peter Jeremy