title: c++ comparing two floating point values
body: <p>I'm wondering what is the difference for comparing two double between this two manner :</p>
  
  <pre><code>double a1 = ...;
  double a2 = ....;
  </code></pre>
  
  <ol>
  <li>fabs(a1-a2) &lt; epsilon</li>
  <li>(fabs(a1-a2)/a2) &lt; epsilon</li>
  </ol>
  
  <p>Is there a prefering way to do that ?</p>
  
  <p>thanks</p>