> Search this forum's archives for other suggestions made in the past. > >It's only a "problem" in the way that computers represent floating point > >numbers internally. I used to have a pointer to a paper that described > >what goes on under the covers, but I can't lay my hands on it at the > >moment. A google search should be able to turn up something. > > What Every Computer Scientist Should Know About Floating Point > http://docs.sun.com/source/806-3568/ncg_goldberg.html
Good article. Thanks, Ben. But are you saying that there is NOT a problem with double multiplication? I.e., the posting below is mistaken? (BTW: Emulated FP is not intrinsically less accurate/precise than hardware FP.) Dennis Leas ------------------- [EMAIL PROTECTED] ----- Original Message ----- From: "Dave Lippincott" <[EMAIL PROTECTED]> To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Friday, January 24, 2003 3:45 PM Subject: Re: Codewarrior 8 Palm Problem in double multiplication !? > Yes, known since Palm OS 2.0. Floating point is emulated so rounding errors > are common. One suggestion is to figure out the accuracy you require and > add the appropriate rounding correction for each calculation. > i.e. you require accuracy to 3 decimal places. Add 0.00005 to function > results to correct and drop decimal places below the required 3. > 64.554999999999 + 0.00005 = 64.555049999 and drop the '049999' from the > result. > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/