> Try the same thing on your emotionally favorite desktop OS, and you'll
> see the very same thing.

For grins, I did just this. On Windows, I added the following to an application
of mine:

     double temp = 1.000000000000000 - 0.999999999000000

The answer: 9.9999997171807e-010.  Which is not even as good as the
            9.9999999998067111E-10 that Pablo implied he got with the Palm OS
floating point routines.  So I think this supports the stance that Palm's
floating point subtraction is OK.

-- Keith Rollin
-- Palm OS Emulator engineer






Peter Epstein <[EMAIL PROTECTED]> on 09/20/2000 02:35:50 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  Peter Epstein <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:    (Keith Rollin/US/PALM)
Subject:  RE: Serious Palm FloatNumber problem



Due to the _floating_ point nature of the representation, it's possible for the
error to drift up into the higher order digits if the exponent goes down, as it
does in your example. That's why you need to keep track of significant figures.
The result of the first subtraction has only about 4 or 5 significant figures.
This is inherent in floating point systems, and is not in any way a bug in
Palm's floating point implementation. Try the same thing on your emotionally
favorite desktop OS, and you'll see the very same thing.
--
Peter Epstein
Palm Inc. Developer







-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to