title: iPhone and floating point math
body: <p>I have following code:</p>
  
  <pre>
  
      float totalSpent;
      int intBudget;
      float moneyLeft;
  
  totalSpent += Amount;
  moneyLeft =  intBudget - totalSpent;
  </pre>
  
  <p>And this is how it looks in debugger: <a href="http://www.braginski.com/math.tiff" rel="nofollow noreferrer">http://www.braginski.com/math.tiff</a></p>
  
  <p>Why would moneyLeft calculated by the code above is .02 different compared to the expression calculated by the debugger?</p>
  
  <p>Expression windows is correct, yet code above produces wrong by .02 result. It only happens for a very large numbers (yet way below int limit)</p>
  
  <p>thanks</p>