On Jul 27, 2006, at 2:18 PM, [EMAIL PROTECTED] wrote:

Are you sure about the "every other language" portion of your
statement?

  Positive. My statement was "that I tried". I tried several of each.

In my experience it is normal for the fractional portion
of a double or single to be thrown away when assigning to an integer
property.

  But there is no fractional portion to throw away.

72 / 2000 = .036, it does not equal .0359999999999999 like the examples
have implied. .036 * 750 is 27.0, again, not 26.99999999.

  I've seen lots of examples where different calculators come with
different values when faced with .9999999, but this number stops at just 3 decimal places. If there were any .3333s or .666666s in the calculation, I could accept a rounding “issue”. But since there are no number to round, it
sure looks like a bug.

Unfortunately, floating point numbers (single and double) are not able to represent .036 exactly because of how they work. REALbasic simply uses the floating point capabilities of the processor at hand. If you want a more detailed explanation, the archives probably contain them -- it's something that comes up every few months.

If you want something with guaranteed precision, you should check out Bob Delaney's free plugins here: <http://homepage.mac.com/delaneyrm/>

HTH,
Jon

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to