I\'m having some trouble understanding why some figures can\'t be represented with floating point number.
As we know, a normal float would have sign bit, exponent,
Each floating-point number in the IEEE 754 standard is, in effect, some integer multiplied by some integer power of two. E.g., 3 is represented by 3 * 20, 96 is represented by 3 * 23, and 3/16 is represented by 3 * 2-4.
There are no integers x and y such that .1 = x * 2y, therefore .1 cannot be exactly represented by a floating-point number. Proof: If .1 = x * 2y, then 10x = 2-y. 2-y is clearly positive, so x is positive. It is also an integer, so 10x is divisible by 10, so it is divisible by 5. Therefore 2-y is a power of two that is divisible by 5, which is clearly impossible.