title: Floating point precision in Python array
body: <p>I apologize for the really simple and dumb question; however, why is there a difference in precision displayed for these two cases? </p>
  
  <p>1)</p>
  
  <pre><code>&gt;&gt; test = numpy.array([0.22])
  &gt;&gt; test2 = test[0] * 2
  &gt;&gt; test2
  0.44
  </code></pre>
  
  <p>2)</p>
  
  <pre><code>&gt;&gt; test = numpy.array([0.24])
  &gt;&gt; test2 = test[0] * 2
  &gt;&gt; test2
  0.47999999999999998
  </code></pre>
  
  <p>I'm using python2.6.6 on 64-bit linux.
  Thank you in advance for your help.</p>
  
  <p>This also hold seems to hold for a list in python</p>
  
  <pre><code>&gt;&gt;&gt; t = [0.22]
  &gt;&gt;&gt; t
  [0.22]
  
  &gt;&gt;&gt; t = [0.24]
  &gt;&gt;&gt; t
  [0.23999999999999999]
  </code></pre>