On 9/2/2006 at 7:34 PM Jim Battle wrote:
Why do we need a floating-point arithmetic standard?
http://www.cs.berkeley.edu/~wkahan/ieee754status/why-ieee.pdf
It includes some tables of the features of FP arithmetic of various
mainframe architectures, plus some handheld calculators, and the hp-85.
Interestingly, it mentions the proposed IEEE standard, as implemented
by the intel 8087 and the motorola 6839.
I started reading this--and then realized that I'd seen this before--20
years ago! I wasn't happy with it then, and my feelings still haven't
changed much. Boiled down to it's basic message "because it's somewhat
better for portability" didn't do much for me back then and does even less
for me now, when the choice of deployment architectures seems to have
boiled down to a precious few.
What the IEEE standard doesn't address--and this is where most numerical
programmers get their shorts in a twist is the differences used in
computation of the transcendental functions. Some implementations are
really good--and some, such as that on S/360 FORTRAN IV is horrible.
AFAIK, Lawrence Livermore didn't use ANY vendor's math function pack, but
wrote their own and deployed it on all of their machines--and it was much
better than anything they could buy.
My run-in with IEEE occurred when I was on contract to Sorcim. They wanted
a math pack for Pascal/MT; they subsequently worked the same package into
SuperCalc. Af first, they wanted everything--all calculations--in BCD
floating point, because "money people" supposedly didn't trust computation
that wasn't integer or decimal. So, I gave them a floating-point package
and math library all implemented in x80 code in BCD. I wasn't proud of it.
Along comes the PC and Lotus 1-2-3 and Sorcim determines that they want to
put a PC-based product out there--and it should use the 8087 if available.
I think I went a little nuts when I was asked if computation could also be
done in IEEE floating-point format but generate exactly the same answers
that the old BCD package did. I finally compromised by getting them to
skip the IEEE bit and just keep intermediate results around in the 8087
extended format, converting to BCD floating point only when necessary.
Why the big to-do about IEEE format? Because it was a "standard"--nothing
more or less. I even think that I cited the above paper to show that the
deal behind IEEE was portability; something that they'd never have to deal
with.
Grumble.
Cheers,
Chuck