Here's a challenge for floating point lovers.

Richard A. O'Keefe ok at goanna.cs.rmit.oz.au
Fri Feb 8 18:46:31 AEST 1991


In article <1700 at bbxsda.UUCP>, scott at bbxsda.UUCP (Scott Amspoker) writes:
> In article <1991Jan29.173341.11899 at zoo.toronto.edu> henry at zoo.toronto.edu (Henry Spencer) writes:
> >IEEE fp ... was designed by people who understood numerical arithmetic.

> The designers didn't necessarily understand business arithmetic.  It's a
> pain in the rear trying to manage rounding errors and arbitrary *decimal*
> precisions with a format that is fundamentally radix 2.  Other than that
> it's a great format.

IEEE 754 wasn't *INTENDED* for business arithmetic.  There are important
numerical reasons why radix 2 was chosen.
It is worth noting that the designers of 754 KNEW that radix 2 and
multiple-of-32-bit-word wasn't ideal for everyone.
That's why there is IEEE 854.  That covers arbitrary word lengths,
and it covers radix ***10*** as well as radix 2.
If you want to claim that the IEEE designers didn't understand business
arithmetic, attack the decimal part of IEEE 854.

It's also worth noting that IEEE 754 double precision gives you
exact +, -, *, div, and mod for integers of up to 15 decimal digits.

-- 
Professional programming is paranoid programming



More information about the Comp.lang.c mailing list