
On Wed, 22 May 1996, Mike Duvos wrote:
Perry Writes:
Floating point systems are built to do approximate math on a very wide range of number sizes. Accounting systems require exact math -- down to the cent. Floats aren't suitable.
Calling floating point math "approximate" is a bit of a misnomer. Floating point numbers all correspond to exact points on the real number line. The floating point number taken as the result of an operation, if that result is not another floating point number, is always chosen consistantly in a way which has minimum error and zero bias.
If floating point is implemented properly in *both* hardware and software, then the claim is valid. I have seen too many instances of floating point support and/or emulation from people like MS and Borland that would scare the bejeebers out of most competent programmers
Floating point numbers can be used to do exact integer arithmetic quite easily. A 48 bit mantissa can represent 14 decimal digit signed integers with no loss of precision, and $999,999,999,999.99 is more than enough magnitude for most bean counters.
Again, exact integer artimetic derived from floating point is dependant on how well the floating point "behaves". Mainframes dont suffer the same fate as some of the uP's do.
-- Mike Duvos $ PGP 2.6 Public Key available $ mpd@netcom.com $ via Finger. 7 $
------------------------------------------------------------------------- "Faced with the choice between changing one's mind and proving that there is no need to do so, almost everybody gets busy on the proof" -- John Kenneth Galbraith "Success is attending a funeral as a spectator" -- E. BonAnno -------------------------------------------------------------------------