<blockquote>
<p>Is it a bug?</p>
</blockquote>
<p>No, a bug is something that violates the specification. The <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Math.html#pow(double,%20double)" rel="noreferrer">specification</a> states:</p>
<blockquote>
<p>Returns the value of the first argument raised to the power of the second argument. Special cases:</p>
<ul>
<li>If the second argument is positive or negative zero, then the result is 1.0.</li>
</ul>
</blockquote>
<p>Finally, mathematically, <a href="https://en.wikipedia.org/wiki/Exponentiation#Zero_to_the_power_of_zero" rel="noreferrer">some do define</a> <code>0^0</code> as <code>1</code>. In fact, Knuth <a href="http://arxiv.org/abs/math/9205211" rel="noreferrer">says</a> that it <em>has</em> to be <code>1</code>.</p>
<blockquote>
<p>The number of mappings from the empty set to the empty set is <code>0^0</code>. It <em>has</em> to be <code>1</code>.</p>
</blockquote>
<p>His reasoning is as follows. If you have two sets, <code>A</code> and <code>B</code>, the number of functions from <code>A</code> to <code>B</code> is <code>|B|^|A|</code>. How many functions are there from the empty set to the empty set? Well, there is exactly one. By this logic, <code>0^0</code> <em>should</em> be <code>1</code>.</p>
Math.pow(0.0, 0.0) returns 1; should be undefined or error ?
<p><code>Math.pow(0.0, 0.0)</code> in Java returns 1 which is wrong. 0^0 is undefined. The same problem exists also in the windows calculator (I am using Win7). Why is that?</p>

<p>Mathematica declares it as an error as well as my Casio scientific calculator, why not java or the Win calculator... Is it a bug? </p>