MSB | S | sign (1 bit) |
---|---|---|
E | biased exponent (w bits) | |
T | trailing significand (t bits) |
float32 | float64 | Parameter |
---|---|---|
32 | 64 | k, storage width in bits |
24 | 53 | p, precision in bits |
127 | 1023 | emax, maximum exponent e |
127 | 1023 | bias, E - e |
1 | 1 | sign bit |
8 | 11 | w, exponent field width in bits |
23 | 52 | t, trailing significand field width in bits |
32 | 64 | k, storage width in bits |
S | E | T | Meaning |
---|---|---|---|
0 | 0 | 0 | +0 |
1 | 0 | 0 | -0 |
0 | 0 | y>0 | +subnormal |
1 | 0 | y>0 | -subnormal |
0 | ~0 | 0 | +Inf |
1 | ~0 | 0 | -Inf |
* | ~0 | 0b1... | qNaN |
* | ~0 | 0b0... | sNaN (T != 0) |
0 | 0<x<~0 | y | +normal |
1 | 0<x<~0 | y | -normal |
The trailing significand field, T, encodes the least significant bits of the precision. The most significant bit is implicitly encoded in the value of the exponent field, E. (This bit is sometimes referred to as the "hidden" bit.) When E is zero, the hidden bit is implicitly zero; when E is non-zero, the hidden bit is implicitly one.