**Zero to the power of zero**, denoted by **0 ^{0}**, 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 0

^{0}= 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 0^{0} to be defined as 1. For example, the following three interpretations of *b*^{0} make just as much sense for *b* = 0 as they do for positive integers b:

- The interpretation of
*b*^{0}as an empty product assigns it the value 1. - The combinatorial interpretation of
*b*^{0}is the number of 0-tuples of elements from a*b*-element set; there is exactly one 0-tuple. - The set-theoretic interpretation of
*b*^{0}is the number of functions from the empty set to a*b*-element set; there is exactly one such function, namely, the empty function.^{[1]}

All three of these specialize to give 0^{0} = 1.

## Polynomials and power series

Likewise, when working with polynomials, it is convenient to define 0^{0} as having the value 1. A polynomial is an expression of the form *a*_{0}*x*^{0} + ⋅⋅⋅ + *a*_{n}*x*^{n}, where *x* is an indeterminate, and the coefficients *a*_{n} are real numbers (or, more generally, elements of some ring). The set of all real polynomials in *x* is denoted by **R**[*x*]. Polynomials are added termwise, and multiplied by applying the usual rules for exponents in the indeterminate *x* (see Cauchy product). With these algebraic rules for manipulation, polynomials form a polynomial ring. The polynomial *x*^{0} is the identity element of the polynomial ring, meaning that it is the (unique) element such that the product of *x*^{0} with any polynomial *p*(*x*) is just *p*(*x*).^{[2]} Polynomials can be evaluated by specializing the indeterminate *x* to a real number. More precisely, for any given real number *a*, there is a unique unital **R**-algebra homomorphism ev_{a} : **R**[*x*] → **R** such that ev_{a}(*x*) = *a*. This is called the *evaluation homomorphism*. Because ev_{a} is unital, ev_{a}(*x*^{0}) = 1. That is, *a*^{0} = 1 for each real number *a*, including 0. The same argument applies with **R** replaced by any ring.^{[3]}

Defining 0^{0} = 1 is necessary for many polynomial identities. For example, the binomial theorem (1 + *x*)^{n} = ∑^{n}_{k=0} (^{n}_{k}) *x*^{k} is not valid for *x* = 0 unless 0^{0} = 1.^{[4]} Similarly, rings of power series require *x*^{0} to be defined as 1 for all specializations of *x*. For example, identities like 1/1−*x* = ∑^{∞}_{n=0} *x*^{n} and *e*^{x} = ∑^{∞}_{n=0} *x*^{n}/*n*! hold for *x* = 0 only if 0^{0} = 1.^{[5]}

In calculus, the power rule *d*/*dx**x*^{n} = *nx*^{n−1} is valid for *n* = 1 at *x* = 0 only if 0^{0} = 1.

## 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.^{[6]} The expression 0^{0} is an indeterminate form: Given real-valued functions *f*(*t*) and *g*(*t*) approaching 0 (as *t* approaches a real number or ±∞, from one side or both sides) with *f*(*t*) > 0 (on each relevant side), 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:

Thus, the two-variable function *x*^{y}, 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 0^{0}.^{[7]}

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.^{[8]}

## Complex exponents

In the complex domain, the function *z*^{w} may be defined for nonzero *z* by choosing a branch of log *z* and defining *z*^{w} as *e*^{w log z}. This does not define 0^{w} since there is no branch of log *z* defined at *z* = 0, let alone in a neighborhood of 0.^{[9]}^{[10]}^{[11]}

## History

In 1752, Euler in *Introductio in analysin infinitorum* wrote that 0^{0} = 1,^{[12]} and an annotation attributed^{[13]} to Mascheroni in a 1787 edition of Euler's book *Institutiones calculi differentialis*^{[14]} offered the "justification"

as well as another more involved justification. In 1814, Pfaff used a squeeze theorem argument to prove that *t*^{t} → 1 as *t* → 0^{+}.^{[8]} On the other hand, in 1821 Cauchy^{[15]} listed 0^{0} along with expressions like 0/0 in a table of indeterminate forms.

In the 1830s, Libri^{[16]}^{[13]} published several arguments attempting to justify the claim 0^{0} = 1. Möbius^{[8]} claimed incorrectly that *f*(*t*)^{g(t)} → 1 whenever *f*(*t*),*g*(*t*) ��� 0 as t approaches a number c (presumably f is assumed positive away from c); he 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 *t*^{n}*P* for some continuous function P not vanishing at 0 and some nonnegative integer n, which is true for analytic functions, but not in general. A commentator who signed his name simply as "S" provided the counterexample (*e*^{−1/t})^{t} → *e*^{−1} as *t* → 0^{+}, and this quieted the debate for some time.^{[17]}

Currently, the situation is viewed as follows:

- Some authors define 0
^{0}as 1 because it simplifies many theorem statements. According to Benson (1999), "The choice whether to define 0^{0}is based on convenience, not on correctness. If we refrain from defining 0^{0}, then certain assertions become unnecessarily awkward. [...] The consensus is to use the definition 0^{0}= 1, although there are textbooks that refrain from defining 0^{0}."^{[18]}Knuth (1992) contends more strongly that 0^{0}"*has*to be 1"; he draws a distinction between the*value*0^{0}, which should equal 1, and the*limiting form*0^{0}(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."^{[17]} - Other authors leave 0
^{0}undefined because 0^{0}is an indeterminate form:*f*(*t*),*g*(*t*) → 0 do not imply*f*(*t*)^{g(t)}→ 0.^{[19]}^{[20]}

There do not seem to be any authors assigning 0^{0} a specific value other than 1.^{[18]}

## 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:^{[21]}

`pow`treats 0^{0}as 1. If the power is an exact integer the result is the same as for`pown`, otherwise the result is as for`powr`(except for some exceptional cases).`pown`treats 0^{0}as 1. The power must be an exact integer. The value is defined for negative bases; e.g.,`pown(-3,5)`is −243.`powr`treats 0^{0}as`NaN`(Not-a-Number – undefined). The value is also`NaN`for cases like`powr(-3,2)`where the base is less than zero. The value of`powr(`is defined by*x*,*y*)*e*^{y ln(x)}.

The `pow` variant is inspired by the `pow` function from C99, mainly for compatibility.^{[22]} 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).^{[23]}

### Programming languages

The C and C++ standards do not specify the result of 0^{0} (a domain error may occur), 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`^{[24]} (for instance, with discrete exponents). The Java standard,^{[25]} the .NET Framework method `System.Math.Pow`

,^{[26]} and Python^{[27]}^{[28]} also treat 0^{0} 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^{[29]} and Perl's `**`

operator^{[30]} (where it is explicitly mentioned that the result of `0**0`

is platform-dependent).

### Mathematical and scientific software

APL^{[citation needed]}, R,^{[31]} Stata^{[citation needed]}, SageMath,^{[32]} Matlab^{[citation needed]}, Magma^{[citation needed]}, GAP^{[citation needed]}, Singular^{[citation needed]}, PARI/GP,^{[33]} and GNU Octave^{[citation needed]} evaluate `x ^{0}` to 1. Mathematica

^{[34]}and Macsyma

^{[citation needed]}simplify

`x`to 1 even if no constraints are placed on

^{0}`x`; however, if

`0`is entered directly, it is treated as an error or indeterminate. SageMath

^{0}^{[citation needed]}does not simplify

`0`. Maple

^{x}^{[citation needed]}, Mathematica

^{[34]}and PARI/GP

^{[33]}

^{[35]}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.

## References

**^**N. Bourbaki, Elements of Mathematics, Theory of Sets, Springer-Verlag, 2004, III.§3.5.**^**Nicolas Bourbaki (1970).*Algèbre*. Springer., §III.2 No. 9: "L'unique monôme de degré 0 est l'élément unité de*A*[(*X*_{i})_{i∈I}]; on l'identifie souvent à l'élément unité 1 de*A*".**^**Nicolas Bourbaki (1970).*Algèbre*. Springer., §IV.1 No. 3.**^**"Some textbooks leave the quantity 0^{0}undefined, because the functions*x*^{0}and 0^{x}have different limiting values when*x*decreases to 0. But this is a mistake. We must define*x*^{0}= 1, for all*x*, if the binomial theorem is to be valid when*x*= 0,*y*= 0, and/or*x*= −*y*. The binomial theorem is too important to be arbitrarily restricted! By contrast, the function 0^{x}is quite unimportant". Ronald Graham; Donald Knuth; Oren Patashnik (1989-01-05). "Binomial coefficients".*Concrete Mathematics*(1st ed.). Addison Wesley Longman Publishing Co. p. 162. ISBN 0-201-14236-8.**^**Vaughn, Herbert E. (1970). "The expression 0^{0}".*The Mathematics Teacher*.**63**: 111–112.**^**Malik, S. C.; Arora, Savita (1992).*Mathematical Analysis*. New York: Wiley. p. 223. ISBN 978-81-224-0323-7.In general the limit of

*φ*(*x*)/*ψ*(*x*) when*x*=*a*in case the limits of both the functions exist is equal to the limit of the numerator divided by the denominator. But what happens when both limits are zero? The division (0/0) then becomes meaningless. A case like this is known as an indeterminate form. Other such forms are ∞/∞, 0 × ∞, ∞ − ∞, 0^{0}, 1^{∞}and ∞^{0}.**^**L. J. Paige (March 1954). "A note on indeterminate forms".*American Mathematical Monthly*.**61**(3): 189–190. doi:10.2307/2307224. JSTOR 2307224.- ^
^{a}^{b}^{c}A. F. Möbius (1834). "Beweis der Gleichung 0^{0}= 1, nach J. F. Pfaff" [Proof of the equation 0^{0}= 1, according to J. F. Pfaff].*Journal für die reine und angewandte Mathematik*.**1834**(12): 134–136. doi:10.1515/crll.1834.12.134. **^**"Since log(0) does not exist, 0^{z}is undefined. For Re(*z*) > 0, we define it arbitrarily as 0." George F. Carrier, Max Krook and Carl E. Pearson,*Functions of a Complex Variable: Theory and Technique*, 2005, p. 15 ISBN 0-89871-595-4**^**"For*z*= 0,*w*≠ 0, we define 0^{w}= 0, while 0^{0}is not defined." Mario Gonzalez,*Classical Complex Analysis*, Chapman & Hall, 1991, p. 56. ISBN 0-8247-8415-4**^**"... Let's start at*x*= 0. Here*x*^{x}is undefined." Mark D. Meyerson, The*x*^{x}Spindle,*Mathematics Magazine***69**, no. 3 (June 1996), 198-206. doi:10.1080/0025570X.1996.11996428**^**Leonhard Euler; J. D. Blanton (transl.) (1988).*Introduction to analysis of the infinite, Book 1*. Springer. ISBN 978-0-387-96824-7., Chapter 6, §99, p. 76.- ^
^{a}^{b}Libri, Guillaume (1833). "Mémoire sur les fonctions discontinues".*Journal für die reine und angewandte Mathematik*.**1833**(10): 303–316. doi:10.1515/crll.1833.10.303. **^**Leonhard Euler (1787).*Institutiones calculi differentialis, Vol. 2*. Ticini. ISBN 978-0-387-96824-7.**^**Augustin-Louis Cauchy,*Cours d'Analyse de l'École Royale Polytechnique*(1821). In his*Oeuvres Complètes*, series 2, volume 3.**^**Libri, Guillaume (1830). "Note sur les valeurs de la fonction 0^{0x}".*Journal für die reine und angewandte Mathematik*.**1830**(6): 67–72. doi:10.1515/crll.1830.6.67.- ^
^{a}^{b}Knuth, Donald E. (1992). "Two Notes on Notation".*The American Mathematical Monthly*.**99**(5): 403–422. arXiv:math/9205211. doi:10.1080/00029890.1992.11995869. - ^
^{a}^{b}Donald C. Benson,*The Moment of Proof : Mathematical Epiphanies.*New York Oxford University Press (UK), 1999, p. 29. ISBN 978-0-19-511721-9 **^**Edwards and Penney (1994).*Calculus*, 4th ed, Prentice-Hall, p. 466.**^**Keedy, Bittinger, and Smith (1982).*Algebra Two*. Addison-Wesley, p. 32.**^**Muller, Jean-Michel; Brisebarre, Nicolas; de Dinechin, Florent; Jeannerod, Claude-Pierre; Lefèvre, Vincent; Melquiond, Guillaume; Revol, Nathalie; Stehlé, Damien; Torres, Serge (2010).*Handbook of Floating-Point Arithmetic*(1 ed.). Birkhäuser. p. 216. doi:10.1007/978-0-8176-4705-6. ISBN 978-0-8176-4704-9. LCCN 2009939668. ISBN 978-0-8176-4705-6 (online), ISBN 0-8176-4704-X (print)**^**"More transcendental questions".*grouper.ieee.org*. Archived from the original on 2017-11-14. Retrieved 2019-05-27. (Beginning of the discussion about the power functions for the revision of the IEEE 754 standard, May 2007.)**^**"Re: A vague specification".*grouper.ieee.org*. Archived from the original on 2017-11-14. Retrieved 2019-05-27. (Suggestion of variants in the discussion about the power functions for the revision of the IEEE 754 standard, May 2007.)**^**Rationale for International Standard—Programming Languages—C (PDF) (Report). Revision 5.10. April 2003. p. 182.**^**"Math (Java Platform SE 8) pow". Oracle.**^**".NET Framework Class Library Math.Pow Method". Microsoft.**^**"Built-in Types — Python 3.8.1 documentation". Retrieved 2020-01-25.Python defines

`pow(0, 0)`and`0 ** 0`to be 1, as is common for programming languages.**^**"math — Mathematical functions — Python 3.8.1 documentation". Retrieved 2020-01-25.Exceptional cases follow Annex 'F' of the C99 standard as far as possible. In particular,

`pow(1.0, x)`and`pow(x, 0.0)`always return 1.0, even when`x`is a zero or a`NaN`.**^**"Lua 5.3 Reference Manual". Retrieved 2019-05-27.**^**"perlop – Exponentiation". Retrieved 2019-05-27.**^**The R Core Team (2019-07-05). "R: A Language and Environment for Statistical Computing – Reference Index" (PDF). Version 3.6.1. p. 23. Retrieved November 22, 2019.`1 ^ y`and`y ^ 0`are 1, always.**^**The Sage Development Team (2020). "Sage 9.2 Reference Manual: Standard Commutative Rings. Elements of the ring**Z**of integers". Retrieved January 24, 2021.For consistency with Python and MPFR, 0^0 is defined to be 1 in Sage.

- ^
^{a}^{b}"pari.git / commitdiff – 10- x ^ t_FRAC: return an exact result if possible; e.g. 4^(1/2) is now 2". Retrieved September 10, 2018. - ^
^{a}^{b}"Wolfram Language & System Documentation: Power". Wolfram. Retrieved August 2, 2018. **^**The PARI Group (2018). "Users' Guide to PARI/GP (version 2.11.0)" (PDF). pp. 10, 122. Retrieved September 4, 2018.There is also the exponentiation operator ^, when the exponent is of type integer; otherwise, it is considered as a transcendental function. [...] If the exponent

*n*is an integer, then exact operations are performed using binary (left-shift) powering techniques. [...] If the exponent*n*is not an integer, powering is treated as the transcendental function exp(*n*log*x*).

## External links

- sci.math FAQ: What is 0
^{0}? - What does 0
^{0}(zero to the zeroth power) equal? on AskAMathematician.com