title: c# Unexpected numbers in double variable in for loop
body: <pre><code>for (double i = 0; i &lt; 0.05; i+= 0.001)
  {
              //do something
  }
  </code></pre>
  <p>In this for loop,</p>
  <p>I thought the count would go as follows: 0, 0.001, 0.002, 0.003, etc., but it becomes 0.0090000000000000011 instead of 0.009.</p>
  <p>Why is such conversion possible?</p>