if I print a value with enough digits, I should be able to read the exact value
No, if you write it in decimal, there is no integer relationship between the number of binary digits and the number of decimal digits needed to represent a number. If you print your number in binary or hexadecimal, you can read it without losing any accuracy.
In general, floating point numbers are not primarily portable between platforms, so your textual representation will not be able to bridge this gap. In practice, most machines use IEEE 754 floating point numbers, so they are likely to work quite well.
source share