IEEE floating point format
Andrew Koenig
ark at alice.UUCP
Thu Aug 3 01:42:06 AEST 1989
In article <3554 at buengc.BU.EDU>, bph at buengc.BU.EDU (Blair P. Houghton) writes:
> In article <9697 at alice.UUCP> ark at alice.UUCP (Andrew Koenig) writes:
> > exponent all 1's fraction == 0 infinity
> > exponent all 1's fraction != 0 NaN
> > exponent all 0's denormalized
> Fascinating; but, what does it mean to say "denormalized" in this context?
It means the number is being represented in `gradual underflow'
mode. To be more specfic: the smallest positive number that can be
represented in IEEE 64-bit form without going into denormalized mode
is 2^-1022. That number is represented this way:
0 00000000001 0000000000000000000000000000000000000000000000000000
If you count the way I did in my last note, this means an exponent
of -1021 and a fraction of .(1)0000000....
The 1 is in parentheses because it's the `hidden bit' -- it's not
actually stored.
The next smaller number is represented this way:
0 00000000000 1111111111111111111111111111111111111111111111111111
This is the largest denormalized number: its value is 2^-1021 times
.(0)11111... That is, the hidden bit becomes 0 when all the exponent
bits are 0. Thus it is possible to represent numbers that are too
small for the normal exponent range, albeit with reduced precision.
As a result of this notatation, the smallest positive number that
can be represented in IEEE 64-bit floating-point is 2^-1074.
--
--Andrew Koenig
ark at europa.att.com
More information about the Comp.lang.c
mailing list