Re: Floating-Point
- Posted by Robert Craig <rds at ATTCANADA.NET> Mar 20, 2000
- 468 views
Everett Williams writes: > Okay, but can we be assured that the floating point will > always be less than the decimal. No, you shouldn't assume that. It's really not as bad as it sounds. Just keep in mind that floating-point numbers are an approximation to the real numbers. Ask yourself "what if the result is a tiny bit higher or lower than mathematics says it should be? Will my code still work?" > I still would like to know where the 17th thru 20th digits > in Irv's printout came from. Those should be zero. > If they are real, where did they come from? They > appear to be an artifact of the print conversion routine. The print conversion routine does its best to convert from binary f.p. to a decimal representation. There is no reason why 0's should suddenly appear after 16 decimal digits. It's true that the digits after about 16 are pretty much random noise and should not be taken too seriously. It's pointless to print more than about 16 digits, given the current use of 64-bit f.p. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com