title: Why is floating point value saved incorrectly in MySQL?
body: <p>We saved a value of 2.01 in a <code>float</code> column in MySQL.</p>
  
  <p>Then, after we applied the <code>avg</code> function, it returned 2.009999990463257</p>
  
  <p>Why is this happening?</p>
  
  <p>Here is the query we are using:</p>
  
  <pre><code>SELECT avg(height)  FROM `students` where class='b1'
  </code></pre>