Zero to the power of zero

Zero to the power of zero, denoted by 00, is a mathematical expression with no agreed-upon value. The most common possibilities are 1 or leaving the expression undefined, with justifications existing for each, depending on context. In algebra and combinatorics, the generally agreed upon value is 00 = 1, whereas in mathematical analysis, the expression is sometimes left undefined. Computer programming languages and software also have differing ways of handling this expression.

Discrete exponents

Many widely used formulas involving natural-number exponents require 00 to be defined as 1. For example, the following three interpretations of b0 make just as much sense for b = 0 as they do for positive integers b:

All three of these specialize to give 00 = 1.

Polynomials and power series

When working with polynomials, it is convenient to define 00 as 1. A (real) polynomial is an expression of the form a0x0 + ⋅⋅⋅ + anxn, where x is an indeterminate, and the coefficients an are real numbers. Polynomials are added termwise, and multiplied by applying the distributive law and the usual rules for exponents. With these algebraic rules for manipulation, polynomials form a ring R[x]. The polynomial x0 is the multiplicative identity of the polynomial ring, meaning that it is the element such that x0 times any polynomial p(x) is just p(x). Polynomials can be evaluated by specializing x to a real number. More precisely, for any given real number r, there is a unique unital R-algebra homomorphism evr : R[x] → R such that evr(x) = r. Because evr is unital, evr(x0) = 1. That is, r0 = 1 for each real number r, including 0. The same argument applies with R replaced by any ring.

Defining 00 = 1 is necessary for many polynomial identities. For example, the binomial theorem (1 + x)n = ∑n
k=0
(n
k
) xk
is not valid for x = 0 unless 00 = 1.

Similarly, rings of power series require x0 to be defined as 1 for all specializations of x. For example, identities like 1/1−x = ∑
n=0
xn
and ex = ∑
n=0
xn/n!
hold for x = 0 only if 00 = 1.

In order for the polynomial x0 to define a continuous function RR, one must define 00 = 1.

In calculus, the power rule d/dxxn = nxn−1 is valid for n = 1 at x = 0 only if 00 = 1.

Continuous exponents Plot of z = xy. The red curves (with z constant) yield different limits as (x, y) approaches (0, 0). The green curves (of finite constant slope, y = ax) all yield a limit of 1.

Limits involving algebraic operations can often be evaluated by replacing subexpressions by their limits; if the resulting expression does not determine the original limit, the expression is known as an indeterminate form. The expression 00 is an indeterminate form: Given real-valued functions f(t) and g(t) approaching 0 (as t approaches a real number or ±∞) with f(t) > 0, the limit of f(t)g(t) can be any non-negative real number or +∞, or it can diverge, depending on f and g. For example, each limit below involves a function f(t)g(t) with f(t), g(t) → 0 as t → 0+ (a one-sided limit), but their values are different:

$\lim _{t\to 0^{+}}{t}^{t}=1,$ $\lim _{t\to 0^{+}}\left(e^{-1/t^{2}}\right)^{t}=0,$ $\lim _{t\to 0^{+}}\left(e^{-1/t^{2}}\right)^{-t}=+\infty ,$ $\lim _{t\to 0^{+}}\left(e^{-1/t}\right)^{at}=e^{-a}.$ Thus, the two-variable function xy, though continuous on the set {(x, y) : x > 0}, cannot be extended to a continuous function on {(x, y) : x > 0} ∪ {(0, 0)}, no matter how one chooses to define 00.

On the other hand, if f and g are both analytic functions on an open neighborhood of a number c, then f(t)g(t) → 1 as t approaches c from any side on which f is positive.

Rotando and Korn showed that if $f$ and $g$ are real functions that vanish at the origin and are analytic at 0, then $\lim _{x\to 0^{+}}f(x)^{g(x)}=1$ . The same conclusion was deduced by Baxley and Hayashi, who also obtained a more general result in which no smoothness conditions are required. More general sufficient conditions for $\lim _{x\to c}f(x)=\lim _{x\to c}g(x)=0$ implying $\lim _{x\to c}f(x)^{g(x)}=1$ have been found.

Complex exponents

In the complex domain, the function zw may be defined for nonzero z by choosing a branch of log z and defining zw as ew log z. This does not define 0w since there is no branch of log z defined at z = 0, let alone in a neighborhood of 0.

History

As a value

In 1752, Euler in Introductio in analysin infinitorum wrote that a0 = 1 and explicitly mentioned that 00 = 1. An annotation attributed to Mascheroni in a 1787 edition of Euler's book Institutiones calculi differentialis offered the "justification"

$0^{0}=(a-a)^{n-n}={\frac {(a-a)^{n}}{(a-a)^{n}}}=1$ as well as another more involved justification. In the 1830s, Libri published several further arguments attempting to justify the claim 00 = 1, though these were far from convincing, even by standards of rigor at the time.

As a limiting form

Euler, when setting 00 = 1, mentioned that consequently the values of the function 0x take a "huge jump", from for x < 0, to 1 at x = 0, to 0 for x > 0. In 1814, Pfaff used a squeeze theorem argument to prove that xx → 1 as x → 0+.

On the other hand, in 1821 Cauchy explained why the limit of xy as positive numbers x and y approach 0 while being constrained by some fixed relation could be made to assume any value between 0 and by choosing the relation appropriately. He deduced that the limit of the full two-variable function xy without a specified constraint is "indeterminate". With this justification, he listed 00 along with expressions like 0/0 in a table of indeterminate forms.

Apparently unaware of Cauchy's work, Möbius in 1834, building on Pfaff's argument, claimed incorrectly that f(x)g(x) → 1 whenever f(x),g(x) → 0 as x approaches a number c (presumably f is assumed positive away from c). Möbius reduced to the case c = 0, but then made the mistake of assuming that each of f and g could be expressed in the form Pxn for some continuous function P not vanishing at 0 and some nonnegative integer n, which is true for analytic functions, but not in general. An anonymous commentator pointed out the unjustified step; then another commentator who signed his name simply as "S" provided the explicit counterexamples (e−1/x)xe−1 and (e−1/x)2xe−2 as x → 0+ and expressed the situation by writing that "00 can have many different values".

Current situation

• Some authors define 00 as 1 because it simplifies many theorem statements. According to Benson (1999), "The choice whether to define 00 is based on convenience, not on correctness. If we refrain from defining 00, then certain assertions become unnecessarily awkward. ... The consensus is to use the definition 00 = 1, although there are textbooks that refrain from defining 00." Knuth (1992) contends more strongly that 00 "has to be 1"; he draws a distinction between the value 00, which should equal 1, and the limiting form 00 (an abbreviation for a limit of f(t)g(t) where f(t), g(t) → 0), which is an indeterminate form: "Both Cauchy and Libri were right, but Libri and his defenders did not understand why truth was on their side."
• Other authors leave 00 undefined because 00 is an indeterminate form: f(t), g(t) → 0 does not imply f(t)g(t) → 1.

There do not seem to be any authors assigning 00 a specific value other than 1.

Treatment on computers

IEEE floating-point standard

The IEEE 754-2008 floating-point standard is used in the design of most floating-point libraries. It recommends a number of operations for computing a power:

• pown (whose exponent is an integer) treats 00 as 1; see § Discrete exponents.
• pow (whose intent is to return a non-NaN result when the exponent is an integer, like pown) treats 00 as 1.
• powr treats 00 as NaN (Not-a-Number) due to the indeterminate form; see § Continuous exponents.

The pow variant is inspired by the pow function from C99, mainly for compatibility. It is useful mostly for languages with a single power function. The pown and powr variants have been introduced due to conflicting usage of the power functions and the different points of view (as stated above).

Programming languages

The C and C++ standards do not specify the result of 00 (a domain error may occur). But for C, as of C99, if the normative annex F is supported, the result for real floating-point types is required to be 1 because there are significant applications for which this value is more useful than NaN (for instance, with discrete exponents); the result on complex types is not specified, even if the informative annex G is supported. The Java standard, the .NET Framework method System.Math.Pow, Julia, and Python also treat 00 as 1. Some languages document that their exponentiation operation corresponds to the pow function from the C mathematical library; this is the case with Lua and Perl's ** operator (where it is explicitly mentioned that the result of 0**0 is platform-dependent).

Mathematical and scientific software

APL,[citation needed] R, Stata, SageMath, Matlab, Magma, GAP, Singular, PARI/GP, and GNU Octave evaluate x0 to 1. Mathematica and Macsyma simplify x0 to 1 even if no constraints are placed on x; however, if 00 is entered directly, it is treated as an error or indeterminate. SageMath does not simplify 0x. Maple, Mathematica and PARI/GP further distinguish between integer and floating-point values: If the exponent is a zero of integer type, they return a 1 of the type of the base; exponentiation with a floating-point exponent of value zero is treated as undefined, indeterminate or error.