title: Python underflow should be less precise
body: <p>I tried this very simple code to see the python underflow in action by calculating the absolute and relative error between 2 functions:</p>
  
  <pre><code>from pylab import *
  
  n = 2000
  x = logspace(-17,-16,n)
  
  y1 = 1/(1+x) - 1/(1-x)
  y2 = (-2 *x)/((1+x)*(1-x))
  
  ea = abs(y1 - y2)
  
  er = ea/abs(y2)
  
  loglog(x[ea&gt;0], er[ea&gt;0])
  </code></pre>
  
  <p>Normally the underflow should appear for x &lt;= 2^-53 but here he appears for x &lt;= 2^-54 = 5.55e-17. cf:</p>
  
  <p><a href="https://i.stack.imgur.com/dXd3b.png" rel="nofollow noreferrer">curve of the evolution of the relative error</a></p>
  
  <p>I can't figure out why, any help would be greatly appreciated.</p>