What 2 and 4 decimal number has the largest difference against its double IEEE754 representation?

39 Views Asked by At

We know that fractional numbers that are powers of 2 like 0.25 (2^-2) or 0.0625 (2^-4) can be represented exactly in a floating point or double type variable.

Any fractional number that is also an exact sum of a power of 2 can also be exactly represented.

However, 0.01 cannot be exactly represented. It will be 0.009999999999999787 when stored as a double type value (binary64).

So, I am wondering whether there is a value or values that will present with the largest discrepancy.