<h1>Donald Knuth</h1>

<p>sort of settled this debate in 1992 with the following:</p>

<p><img src="https://i.stack.imgur.com/KARrP.png" alt="enter image description here"></p>

<p>And went even more into details in his paper <a href="http://arxiv.org/pdf/math/9205211v1.pdf" rel="nofollow noreferrer" title="Two Notes on Notation">Two Notes on Notation</a>.</p>

<p>Basically, while we don't have 1 as the limit of <code>f(x)/g(x)</code> for all not all functions <code>f(x)</code> and <code>g(x)</code>, it still makes combinatorics so much simpler to define <code>0^0=1</code>, and then just make special cases in the few places where you need to consider functions such as <code>0^x</code>, which are weird anyway. After all <code>x^0</code> comes up a lot more often.</p>

<p>Some of the best discussions I know of this topic (other than the Knuth paper) are:</p>

<ul>
<li><a href="http://mathforum.org/dr.math/faq/faq.0.to.0.power.html" rel="nofollow noreferrer">http://mathforum.org/dr.math/faq/faq.0.to.0.power.html</a></li>
<li><a href="http://www.quora.com/Mathematics/What-is-math-0-0-math?share=1" rel="nofollow noreferrer">http://www.quora.com/Mathematics/What-is-math-0-0-math?share=1</a></li>
<li><a href="https://math.stackexchange.com/questions/475337/the-binomial-formula-and-the-value-of-00">https://math.stackexchange.com/questions/475337/the-binomial-formula-and-the-value-of-00</a></li>
</ul>
Why is Math.pow(0, 0) === 1?
<p>We all know that 0<sup>0</sup> is indeterminate.</p>

<p><strong>But</strong>, <em>javascript</em> says that:</p>

<pre><code>Math.pow(0, 0) === 1 // true
</code></pre>

<p>and <em>C++</em> says the same thing:</p>

<pre><code>pow(0, 0) == 1 // true
</code></pre>

<p>WHY?</p>

<p>I know that:</p>

<pre><code>&gt;Math.pow(0.001, 0.001)
0.9931160484209338
</code></pre>

<p>But why does <code>Math.pow(0, 0)</code> throw no errors? Or maybe a <code>NaN</code> would be better than <code>1</code>.</p>