title: Assert.AreEqual() with System.Double getting really confusing
body: <h3>Description</h3>
  
  <p>This is not a real world example! Please don't suggest using <code>decimal</code> or something else. </p>
  
  <p>I am only asking this because I really want to know why this happens.</p>
  
  <p>I recently saw the awesome Tekpub Webcast <strong>Mastering C# 4.0 with Jon Skeet</strong> again. </p>
  
  <p>On episode <strong>7 - Decimals and Floating Points</strong> it is going really weird and even our 
  <strong>Chuck Norris of Programming (aka Jon Skeet)</strong> does not have a real answer to my question.
  Only a <em>might be</em>.</p>
  
  <h3>Question: Why did <code>MyTestMethod()</code> fail and <code>MyTestMethod2()</code> pass?</h3>
  
  <h3>Example 1</h3>
  
  <pre><code>[Test]
  public void MyTestMethod()
  {
      double d = 0.1d;
      d += 0.1d;
      d += 0.1d;
      d += 0.1d;
      d += 0.1d;
      d += 0.1d;
      d += 0.1d;
      d += 0.1d;
      d += 0.1d;
      d += 0.1d;
  
      Console.WriteLine("d = " + d);
      Assert.AreEqual(d, 1.0d);
  }
  </code></pre>
  
  This results in
  
  <blockquote>
    <p>d = 1</p>
    
    <p>Expected: 0.99999999999999989d
      But was:  1.0d</p>
  </blockquote>
  
  <h3>Example 2</h3>
  
  <pre><code>[Test]
  public void MyTestMethod2()
  {
      double d = 0.1d;
      d += 0.1d;
      d += 0.1d;
      d += 0.1d;
      d += 0.1d;
  
      Console.WriteLine("d = " + d);
      Assert.AreEqual(d, 0.5d);
  }
  </code></pre>
  
  This results in success
  
  <blockquote>
    <p>d = 0,5</p>
  </blockquote>
  
  <p>But why ?</p>
  
  <h3>Update</h3>
  
  <p>Why doesn't <code>Assert.AreEqual()</code> cover that? </p>