It is about the normalized floating-point representation of real numbers (IEEE standard 754). Why does the data type double (64 bits) with mantissa length with 53 bits for the exponent range [-1022, 1023]?

Why is not the range $[-\left \lfloor{\frac{2^{11}}{2}}\right \rfloor,\left \lceil{\frac{2^{11}}{2}}\right \rceil -1] = [-1024, 1023] $ used?

I can not understand why the exponent range [-1022, 1023] arises. On several websites (Wikipedia, also on YouTube) it is said that the value for the highest and the smallest exponent is reserved (for: NaN, infty, ...?). But in my opinion does not explain [-1022, 1023 ]. What are -1024 and -1023 used for? Why are these values taken out? The same applies to the case for 32 bits, where only the range for exponents [-126, 127], instead of [-128, 127] occurs.

  • 1
    $\begingroup$ The highest exponent is for infinities and NaNs. The smallest exponent is for 0 and denormals. Keep in mind that IEEE 754 uses a hidden bit for the significand. $\endgroup$ – Fabio Somenzi Oct 7 '19 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.