Theorem 15
When a binary IEEE single precision number is converted to the closest eight digit decimal number, it is not always possible to uniquely recover the binary number from the decimal one. However, if nine decimal digits are used, then converting the decimal number to the closest binary number will recover the original floating-point number.
Proof
Binary single precision numbers lying in the half open interval
To show that 9 digits are sufficient, it is sufficient to show that the spacing between binary numbers is always greater than the spacing between decimal numbers. This will ensure that for each decimal number
To show that the spacing between binary numbers is always greater than the spacing between decimal numbers, consider an interval
The same argument applied to double precision shows that 17 decimal digits are required to recover a double precision number.