title: Wasn't the Double Type precision of 15 digits in C#?
body: <p>I was testing this code from <a href="http://www.yoda.arachsys.com/csharp/teasers.html" rel="noreferrer">Brainteasers:</a> </p>
  
  <pre><code>        double d1 = 1.000001;
  
          double d2 = 0.000001;
  
          Console.WriteLine((d1 - d2) == 1.0);
  </code></pre>
  
  <p>And the result is "False". When I change the data type:</p>
  
  <pre><code>        decimal d1 = 1.000001M;
  
          decimal d2 = 0.000001M;
  
          decimal d3 = d1-d2;
  
          Console.WriteLine(d3 == 1);
  </code></pre>
  
  <p>The program writes the correct answer: "True". </p>
  
  <p>This problem just uses 6 digits after the floating point. What happened with the precision of 15 digits?</p>