title: Comparing double-precision numbers that are potentially infinite
body: <p>I have two double variables that can potentially be equal to Infinity. I would like to compare them and allow for a margin of error. I cannot use assertEquals due to the environment I work with.</p>
  <p>I tried</p>
  <pre><code>assert Math.abs(a-b)&lt;DELTA;
  </code></pre>
  <p>But if both a and b are Infinity this returns false. Is there a short way to check for equality without making an explicit check for the Infinity case?</p>