I reading about floating point and rounding off errors that occur during the floating point arithmetic.
I read lot of articles on IEEE 754-Single precision / Double precision format. I understand that there is sign bit, 8(or) 11 bits of exponent and 23 (or) 52 bits of significand along with implicit leading bit.
I also know that the real numbers whose denominator is not a prime factor of 2 cannot be exactly representable For E.g 0.1 in binary is 0.0001100110011.....
i understood that 0.1+0.1+0.1 is not equal to 0.3 because the accumulation of rounding error.
Also 0.5 is exactly representable in binary format because it is 1/2. But i don't understand given the above accumulation of rounding error , why 0.1+0.1+0.1+0.1+0.1 = 0.5 ?
0.1
five times? – MooseBoys