title: Evaluate if two doubles are equal based on a given precision, not within a certain fixed tolerance
body: <p>I'm running NUnit tests to evaluate some known test data and calculated results.  The numbers are floating point doubles so I don't expect them to be exactly equal, but I'm not sure how to treat them as equal for a given precision.</p>
  
  <p>In NUnit we can compare with a fixed tolerance:</p>
  
  <pre><code>double expected = 0.389842845321551d;
  double actual   = 0.38984284532155145d; // really comes from a data import
  Expect(actual, EqualTo(expected).Within(0.000000000000001));
  </code></pre>
  
  <p>and that works fine for numbers below zero, but as the numbers grow the tolerance really needs to be changed so we always care about the same number of digits of precision.</p>
  
  <p>Specifically, this test fails:</p>
  
  <pre><code>double expected = 1.95346834136148d;
  double actual   = 1.9534683413614817d; // really comes from a data import
  Expect(actual, EqualTo(expected).Within(0.000000000000001));
  </code></pre>
  
  <p>and of course larger numbers fail with tolerance..</p>
  
  <pre><code>double expected = 1632.4587642911599d;
  double actual   = 1632.4587642911633d; // really comes from a data import
  Expect(actual, EqualTo(expected).Within(0.000000000000001));
  </code></pre>
  
  <p>What's the correct way to evaluate two floating point numbers are equal with a given precision? Is there a built-in way to do this in NUnit?</p>