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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With