title: iphone float vs integer rounding?
body: <p>Okay, from what I understand, an integer that is a fraction will be rounded one way or the other so that if a formula comes up with say 5/6 - it will automatically round it to 1.  I have a calculation:</p>
  
  <pre><code>xyz = ((1300 - [abc intValue])/6) + 100;
  </code></pre>
  
  <p>xyz is defined as an NSInteger, abc is an NSString that is chosen via a UIPicker.  I want the calculation (1300 - [abc intValue]) to add 1 to 100 for each 6 units below 1300.  For example, 1255 should result in xyz having a value of 100 and 1254 should result in a value of 101.</p>
  
  <p>Now, I understand that my formula above is wrong because of the rounding principles, but I am getting some CRAZY results from the program itself.  When I punched in 1259 - I got 106.  When I punched in 1255 - I got 107.  Why would it behave that way?</p>