A floating-point number is a finite or infinite number that is representable in a floating-point format, i.e., a floating-point representation that is not a NaN.
In the IEEE 754-2008 standard, all floating-point numbers - including zeros and infinities - are signed.
IEEE 754-2008 allows for five "basic formats" for floating-point numbers including three binary formats
(32-, 64-, and 128-bit) and two decimal formats (64-
and 128-bit); it also specifies several "recommended formats" for extending
these basic formats to allow for even higher precision.
All basic numerical formats are characterized by specifying a radix , a precision
(i.e., the number of digits
in the significand), and an exponent range
determined by the precision
of the given format. In general, the finite nonzero floating-point
numbers are of the form
where
indicates the sign of the number,
is its exponent, and
is its significand,
with at most
base-
digits. In normalized scientific
form its leading digit is nonzero;
subnormal values may have leading zeros.
Note that the description in the representation above is framed so that the significand
is viewed in scientific form (with the
radix point immediately following the first digit),
though the representation may be re-expressed to view
as an integer instead (whereby
both
and the exponent
in the representation above will change format accordingly).
| 32-bit binary | 64-bit binary | 128-bit binary | 64-bit decimal | 128-bit decimal | |
| precision
| 24 | 53 | 113 | 16 | 34 |
| emax | +127 | +1023 | +16383 | +384 | +6144 |
The above table summarizes the characteristics of the five basic number formats. Note that
by definition.
| 32-bit binary | 64-bit binary | 128-bit binary | 64-bit decimal | 128-bit decimal | |
| precision
| |||||
| emax |
As mentioned previously, IEEE 754-2008 also provides a framework of recommended formats by which the five basic formats may be extended.
The table above summarizes the characteristics for the parameters
of these extended-format floating-point numbers. Note that all such formats-both
basic and recommended-allow for and
,
, and two kinds of NaNs.
In the literature, a distinction is made between normal and subnormal floating-point numbers. In particular,
the smallest positive normal
floating-point number is and the largest is
; on the other hand, nonzero
floating-point numbers having absolute value less
than
may exist and are called subnormal. Subnormal
numbers are characterized by the fact that they always have fewer than
significant digits;
moreover, every finite floating-point number is an integer
multiple of the smallest subnormal absolute
value
(IEEE Computer Society 2008).