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 , whereas in mathematical analysis, the expression is sometimes left undefined. Computer programs also have differing ways of handling this expression.
Likewise, when working with polynomials, it is convenient to define as having the value 1. A polynomial is an expression of the form where is an indeterminate, and the coefficients are real numbers. The set of all real polynomials in is denoted by. Polynomials are added termwise, and multiplied by applying the usual rules for exponents in the indeterminate . With these algebraic rules for manipulation, polynomials form a polynomial ring. The polynomial is the identity element of the polynomial ring, meaning that it is the element such that the product of with any polynomial is just. Polynomials can be evaluated by specializing the indeterminate to be a real number. More precisely, for any given real number there is a uniqueunital ring homomorphism such that. This is called the evaluation homomorphism. Because it is a unital homomorphism, we have That is, for all specializations of to a real number. This perspective is significant for many polynomial identities appearing in combinatorics. For example, the binomial theorem is not valid for unless. Similarly, rings of power series require to be true for all specializations of. Thus identities like and are only true as functional identities if. In differential calculus, the power rule is not valid for at unless.
Continuous exponents
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. In fact, when and are real-valued functions both approaching , with, the function need not approach ; depending on and, the limit of can be any non-negative real number or, or it can diverge. For example, the functions below are of the form with as , but the limits are different: Thus, the two-variable function, though continuous on the set cannot be extended to a continuous function on, no matter how one chooses to define. However, under certain conditions, such as when and are both analytic functions at zero and is positive on the open interval for some positive, the limit approaching from the right is always.
Complex exponents
In the complex domain, the function may be defined for nonzero by choosing a branch of and defining as. This does not define since there is no branch of defined at, let alone in a neighborhood of.
The debate over the definition of has been going on at least since the early 19th century. At that time, most mathematicians agreed that, until in 1821 Cauchy listed along with expressions like in a table of indeterminate forms. In the 1830s Guglielmo Libri Carucci dalla Sommaja published an unconvincing argument for, and Möbius sided with him, erroneously claiming that whenever. A commentator who signed his name simply as "S" provided the counterexample of, and this quieted the debate for some time. More historical details can be found in Knuth. More recent authors interpret the situation above in different ways:
Some argue that the best value for depends on context, and hence that defining it once and for all is problematic. According to Benson, "The choice whether to define is based on convenience, not on correctness. If we refrain from defining, then certain assertions become unnecessarily awkward. The consensus is to use the definition, although there are textbooks that refrain from defining."
Others argue that should be defined as 1. Knuth contends strongly that "has to be 1", drawing a distinction between the value, which should equal 1 as advocated by Libri, and the limiting form , which is necessarily an indeterminate form as listed by Cauchy: "Both Cauchy and Libri were right, but Libri and his defenders did not understand why truth was on their side." Vaughn gives several other examples of theorems whose statements require 00 = 1 as a convention.
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:
pow treats 00 as 1. If the power is an exact integer the result is the same as for pown, otherwise the result is as for powr.
pown treats 00 as 1. The power must be an exact integer. The value is defined for negative bases; e.g., pown is −243.
powr treats 00 as NaN. The value is also NaN for cases like powr where the base is less than zero. The value is defined by epower×log.
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.
Programming languages
The C and C++ standards do not specify the result of 00, but as of C99, if the normative annex F is supported, the result is required to be 1 because there are significant applications for which this value is more useful than NaN. The Java standard, the.NET FrameworkmethodSystem.Math.Pow, 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.
, 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 ofinteger 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.