Normal number (computing)
Floating-point formats |
---|
IEEE 754 |
Other |
In computing, a normal number is a non-zero number in a floating-point representation which is within the balanced range supported by a given floating-point format: it is a floating point number that can be represented without leading zeros in its significand.
The magnitude of the smallest normal number in a format is given by:
[math]\displaystyle{ b^{E_{\text{min}}} }[/math]
where b is the base (radix) of the format (like common values 2 or 10, for binary and decimal number systems), and [math]\displaystyle{ E_{\text{min}} }[/math] depends on the size and layout of the format.
Similarly, the magnitude of the largest normal number in a format is given by
- [math]\displaystyle{ b^{E_{\text{max}}}\cdot\left(b - b^{1-p}\right) }[/math]
where p is the precision of the format in digits and [math]\displaystyle{ E_{\text{min}} }[/math] is related to [math]\displaystyle{ E_{\text{max}} }[/math] as:
[math]\displaystyle{ E_{\text{min}}\, \overset{\Delta}{\equiv}\, 1 - E_{\text{max}} = \left(-E_{\text{max}}\right) + 1 }[/math]
In the IEEE 754 binary and decimal formats, b, p, [math]\displaystyle{ E_{\text{min}} }[/math], and [math]\displaystyle{ E_{\text{max}} }[/math] have the following values:[1]
Format | [math]\displaystyle{ b }[/math] | [math]\displaystyle{ p }[/math] | [math]\displaystyle{ E_{\text{min}} }[/math] | [math]\displaystyle{ E_{\text{max}} }[/math] | Smallest Normal Number | Largest Normal Number |
---|---|---|---|---|---|---|
binary16 | 2 | 11 | −14 | 15 | [math]\displaystyle{ 2^{-14} \equiv 0.00006103515625 }[/math] | [math]\displaystyle{ 2^{15}\cdot\left(2 - 2^{1-11}\right) \equiv 65504 }[/math] |
binary32 | 2 | 24 | −126 | 127 | [math]\displaystyle{ 2^{-126} \equiv \frac{1}{2^{126}} }[/math] | [math]\displaystyle{ 2^{127}\cdot\left(2 - 2^{1-24}\right) }[/math] |
binary64 | 2 | 53 | −1022 | 1023 | [math]\displaystyle{ 2^{-1022} \equiv \frac{1}{2^{1022}} }[/math] | [math]\displaystyle{ 2^{1023}\cdot\left(2 - 2^{1-53}\right) }[/math] |
binary128 | 2 | 113 | −16382 | 16383 | [math]\displaystyle{ 2^{-16382} \equiv \frac{1}{2^{16382}} }[/math] | [math]\displaystyle{ 2^{16383}\cdot\left(2 - 2^{1-113}\right) }[/math] |
decimal32 | 10 | 7 | −95 | 96 | [math]\displaystyle{ 10^{-95} \equiv \frac{1}{10^{95}} }[/math] | [math]\displaystyle{ 10^{96}\cdot\left(10 - 10^{1-7}\right) \equiv 9.999999 \cdot 10^{96} }[/math] |
decimal64 | 10 | 16 | −383 | 384 | [math]\displaystyle{ 10^{-383} \equiv \frac{1}{10^{383}} }[/math] | [math]\displaystyle{ 10^{384}\cdot\left(10 - 10^{1-16}\right) }[/math] |
decimal128 | 10 | 34 | −6143 | 6144 | [math]\displaystyle{ 10^{-6143} \equiv \frac{1}{10^{6143}} }[/math] | [math]\displaystyle{ 10^{6144}\cdot\left(10 - 10^{1-34}\right) }[/math] |
For example, in the smallest decimal format in the table (decimal32), the range of positive normal numbers is 10−95 through 9.999999 × 1096.
Non-zero numbers smaller in magnitude than the smallest normal number are called subnormal numbers (or denormal numbers).
Zero is considered neither normal nor subnormal.
See also
- Normalized number
- Half-precision floating-point format
- Single-precision floating-point format
- Double-precision floating-point format
References
- ↑ IEEE Standard for Floating-Point Arithmetic, 2008-08-29, doi:10.1109/IEEESTD.2008.4610935, ISBN 978-0-7381-5752-8, http://ieeexplore.ieee.org/servlet/opac?punumber=4610933, retrieved 2015-04-26
Original source: https://en.wikipedia.org/wiki/Normal number (computing).
Read more |