The bits for the exponent have two reserved values: one for encoding 0 and subnormal numbers, and one for encoding ∞ and NaN. As a result, the normal range is two less than you would otherwise expect. See binary64 3.4 of the IEEE-754 standard ( w - the number of bits in the exponent is 11 in the case of binary64 ):
The biased coding range of E should include:
- each integer from 1 to 2 w - 2 inclusive for encoding normal numbers
- reserved value 0 for encoding ± 0 and subnormal numbers
- reserved value 2 w - 1 for encoding ± ∞ and NaNs.
source share