|
|
|
|
|
by nly
2034 days ago
|
|
I was working on a problem yesterday at work where a remote system was sending prices (market data) to us in IEE754 binary doubles One of the test vectors was 5.80, but when we were printing them out to 15 digits of precision (the maximum a double is guaranteed to preserve) we were seeing "5.80000019073486", where of course we expected to see "5.8". As it turns out this is the closest to 5.8 you can get in single precision so the remote system was obviously sourcing these from a C 'float'. sigh |
|