0
votes

How many x such that 1 <= x <= 2 have exact representation in single precision floating point number IEEE 754 representation?

1
8388609. There are 8388608 in 1 <= x < 2, and add one for including 2, which has a different exponent, in the range.Patricia Shanahan

1 Answers

3
votes

There are 8388609. Of those 2^23 are in 1 <= x < 2, all having the same sign and exponent, with 23 bits of fraction. Add one for including 2, which is the same bit pattern as 1 except for adding 1 to the exponent.