Say I have two Python floats a and b, is there an easy way to find out how many representable real numbers are between the two in IEEE-754 representati
a
b
For positive numbers b > a > 0, the answer is approximately:
(2**52) ** (log(b,2) - log(a,2))
There are 52 bits of mantissa ( past the implied 1 ), multiplied by 2 raised to an exponent.
So there are 2**52 numbers in range [1:2) as in the range [1024:2048)