title: Account for floating point imprecision when testing "approximately greater than"
body: <p>Let's say I want to check whether two numbers <code>a</code> and <code>b</code> are equal. Because of imprecision with floating points, I know that instead of simply checking <code>a == b</code>, I usually want to pick some small number <code>eps</code> and check instead that <code>abs(a - b) &lt; eps</code>.</p>
  
  <p>But what do I do if I want to take into account floating point errors when checking that <code>a &gt; b</code>? I'm guessing that instead of simply</p>
  
  <pre><code>if (a &gt; b) {
    ...
  }
  </code></pre>
  
  <p>I want to do something like:</p>
  
  <pre><code>if ((a &gt; b) || abs(a - b) &lt; eps) {
    ...
  }
  </code></pre>
  
  <p>Is this correct? How do I check that <code>a</code> is "approximately greater than" <code>b</code>?</p>