IEEE floating point format

Andrew Koenig ark at alice.UUCP
Sun Jul 30 08:51:27 AEST 1989


In article <1270 at atanasoff.cs.iastate.edu>, hascall at atanasoff.cs.iastate.edu (John Hascall) writes:
> In article <9697 at alice.UUCP> ark at alice.UUCP (Andrew Koenig) writes:
> >In article <2170002 at hpldsla.HP.COM>, manoj at hpldsla.HP.COM (Manoj Joshi) writes:

> >> What is the format for the IEEE floating point storage

> >The format is:

> >	field		32-bit format		64-bit format

> >	sign			1			1
> >	exponent		8			12
> >	fraction		23			55
>                             ------                    -----
> 				32 (ok!)                68 (huh?)

>       Is it <1,8,55>, <1,12,51> or some other thing?
>       (or have they found a way for more hidden bits :-)

Oh well.  I meant 51 bits in double precision, plus a hidden bit.
Similarly, the 23 bits in single precision doesn't include the
hidden bit.  Therefore there are effectively 24 significant bits
in single precision and 52 in double precision.

The largest integer N such that N and N-1 can both be exactly
represented in single precision is (2^24)-1; the largest for
double precision is (2^52)-1.

I hope I got it right this time.
-- 
				--Andrew Koenig
				  ark at europa.att.com



More information about the Comp.lang.c mailing list