IEEE floating point format
Andrew Koenig
ark at alice.UUCP
Sat Aug 5 03:31:57 AEST 1989
In article <3591 at buengc.BU.EDU>, bph at buengc.BU.EDU (Blair P. Houghton) writes:
> Next question: do C compilers (math libraries, I expect I should mean)
> on IEEE-FP-implementing machines generally limit doubles to normalized
> numbers, or do they blithely allow precision to waft away in the name
> of a slight increase in the number-range?
> I expect the answer is "the compiler has nothing to do with it", so the
> next question would be, are there machines that don't permit the loss
> of precision without specific orders to do so?
If you implement IEEE floating point, you must implement denormalized
numbers -- they're part of the spec.
I don't see, though, why you describe denormalized numbers as `the
loss of precision'. Compared with the alternative, it's a gain in
precision. After all, the only other thing you could do would be
to underflow to 0, which would lose all precision.
I don't remember whether IEEE requires you to be able to generate
a trap as a side effect of an operation whose result is denormalized.
--
--Andrew Koenig
ark at europa.att.com
More information about the Comp.lang.c
mailing list