title: Strange unsigned long long int behavior
body: <p>I was using unsigned long long int for some calculations but</p>
  
  <pre><code>std::cout &lt;&lt; std::setprecision(30) &lt;&lt; 900000000000001i64+4*pow(10, 16);
  </code></pre>
  
  <p>Gives Output:<code>40900000000000000</code></p>
  
  <p>and this</p>
  
  <pre><code>std::cout &lt;&lt; std::setprecision(30) &lt;&lt; 900000000000011i64+4*pow(10, 16);
  </code></pre>
  
  <p>Gives Output:<code>40900000000000008</code></p>
  
  <p>Now i have no idea what is happening i tried removing <code>i64</code> tries printing <code>4*pow(10, 16)</code> gives the correct result <code>40000000000000000</code> also tried printing <code>40900000000000011</code> directly, it prints the correct result. It works fine for power of 10^14 but after that it starts to behave strangely.</p>
  
  <p>Can someone explain what is happening?</p>