My assumptions for IEEE 754-2008:
binary16 - 2^16 distinct values, binary32 - 2^32 distinct values, ... binary128 - 2^128 distinct values.
Is this correct?
This is a trick question.
The floating-point formats define some special values. Whether you count these as distinct depends on your point of view. The following is for double-precision (binary64):
So, to summarize:
2*(2^11-1)*2^52-1 = 18,437,736,874,454,810,623
.For binary16, the number of distinct real numbers is 2*(2^5-1)*2^10-1 = 63,487
. For binary32, it's 2*(2^8-1)*2^23-1=4,278,190,079
. For binary128, it's 2*(2^15-1)*2^112-1
or about 3.4*10^38
.
2*(2^5-1)*(2^10-1)
or (2*(2^5-1)*2^10)-1
? The latter makes more sense to me, but if it's the former, can you please clarify?
Commented
Oct 30, 2013 at 0:00