title: Python math is wrong
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5997027/python-rounding-error-with-float-numbers">Python rounding error with float numbers</a>  </p>
  </blockquote>
  
  
  
  <pre><code>Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) 
  [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
  Type "copyright", "credits" or "license()" for more information.
  &gt;&gt;&gt; 4.2 - 1.8
  2.4000000000000004
  &gt;&gt;&gt; 1.20 - 1.18
  0.020000000000000018
  &gt;&gt;&gt; 5.1 - 4
  1.0999999999999996
  &gt;&gt;&gt; 5 - 4
  1
  &gt;&gt;&gt; 5.0 - 4.0
  1.0
  </code></pre>
  
  <p>Why is Python getting its maths wrong?</p>