title: Random numbers when trying to insert a float into a string
body: <p>In python, I run this simple code:</p>
  
  <pre class="lang-py prettyprint-override"><code>print('number is %.15f'%1.6)
  </code></pre>
  
  <p>which works fine (Output: <code>number is 1.600000000000000</code>), but when I take the decimal places to <code>16&gt;=</code>, I start getting random numbers at the end. For example:</p>
  
  <pre class="lang-py prettyprint-override"><code>print('number is %.16f'%1.6)
  </code></pre>
  
  <p>Output: <code>number is 1.6000000000000001</code> and </p>
  
  <pre class="lang-py prettyprint-override"><code>print('number is %.20f'%1.6)
  </code></pre>
  
  <p>Output: <code>number is 1.60000000000000008882</code></p>
  
  <p>Does this have to do with the way computers compute numbers?</p>
  
  <p>edit: Thanks for all the responses! I understand it now and it was fun to learn</p>