Conversion of decimal floating point numbers to binary and back
问题 My question, in short is, why does rounding error in floats only show up after calculations and not for storage of literals? What I mean is this - I know about the issues that arise due to rounding error in floats when converting from decimal to binary and back. Eg, in Java: double a = 10.567; double b = 2.16; double c = a * b; c then stores the value 22.824720000000003, instead of 22.82472. This is because the result 22.82472 cannot be stored accurately in the finite binary digits of the