title: Wrong Calculation?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1420752/is-double-multiplication-broken-in-net">Is double Multiplication Broken in .NET?</a><br>
    <a href="https://stackoverflow.com/questions/3385685/php-unexpected-result-of-float-to-int-type-cast">PHP unexpected result of float to int type cast</a>  </p>
  </blockquote>
  
  
  
  <pre><code>echo (int) ( (0.1+0.7) * 10); 
  </code></pre>
  
  <p>Gives me answer 7 but not 8. </p>
  
  <pre><code>echo (int) ( (0.1+0.8) * 10); 
  </code></pre>
  
  <p>Gives answer 9 which is right</p>
  
  <p>whats wrong? can anybody explain</p>
  
  <p>thanx,
  -Navi</p>