The bits for the exponent have two reserved values, one for encoding 0
and subnormal numbers, and one for encoding ∞ and NaNs. As a result of this, the range of normal exponents is two smaller than you would otherwise expect. See §3.4 of the IEEE-754 standard (w
is the number of bits in the exponent — 11
in the case of binary64
):
The range of the encoding's biased exponent E shall include:
― Every integer between 1 and 2w – 2, inclusive, to encode normal numbers
― The reserved value 0 to encode ±0 and subnormal numbers
― The reserved value 2w – 1 to encode ±∞ and NaNs.