title: Difference between the built-in pow() and math.pow() for floats, in Python?
body: <p>Is there a difference in the results returned by Python's built-in <code>pow(x, y)</code> (no third argument) and the values returned by <code>math.pow()</code>, in the case of two <em>float</em> arguments.</p>
  
  <p>I am asking this question because the <a href="http://docs.python.org/library/math.html#math.pow" rel="noreferrer">documentation</a> for <code>math.pow()</code> implies that <code>pow(x, y)</code> (i.e. <code>x**y</code>) is essentially the same as <code>math.pow(x, y)</code>:</p>
  
  <blockquote>
    <p><strong>math.pow(x, y)</strong></p>
    
    <p>Return x raised to the power y. 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. If both x and y are finite, x is negative, and y
    is not an integer then pow(x, y) is undefined, and raises ValueError.</p>
    
    <p>Changed in version 2.6: The outcome of 1**nan and nan**0 was undefined.</p>
  </blockquote>
  
  <p>Note the last line: the documentation implies that the behavior of <code>math.pow()</code> is that of the exponentiation operator <code>**</code> (and therefore of <code>pow(x, y)</code>).  Is this officially guaranteed?</p>
  
  <p>Background: My goal is to provide an implementation of <em>both</em> the built-in <code>pow()</code> and of <code>math.pow()</code> for numbers with uncertainty <em>that behaves in the same way</em> as with regular Python floats (same numerical results, same exceptions, same results for corner cases, etc.). I have <a href="http://packages.python.org/uncertainties/" rel="noreferrer">already implemented</a> something that works quite well, but there are some <a href="https://stackoverflow.com/questions/10198753/zero-division-error-in-python-uncertainties-package">corner cases</a> that need to be handled.</p>