Next: Floating-point Context, Up: Floating-point Programming [Contents][Index]

Although floating-point representations vary from machine to machine, the most commonly encountered representation is that defined by the IEEE 754 Standard. An IEEE-754 format value has three components:

- A sign bit telling whether the number is positive or negative.
- An
*exponent*,`e`, giving its order of magnitude. - A
*significand*,`s`, specifying the actual digits of the number.

The value of the
number is then
`s * 2^e`.
The first bit of a non-zero binary significand
is always one, so the significand in an IEEE-754 format only includes the
fractional part, leaving the leading one implicit.
The significand is stored in *normalized* format,
which means that the first bit is always a one.

Three of the standard IEEE-754 types are 32-bit single precision, 64-bit double precision and 128-bit quadruple precision. The standard also specifies extended precision formats to allow greater precisions and larger exponent ranges.