
14 Aug
2013
14 Aug
'13
6:45 p.m.
"John Maddock"
I would have thought it would be better for the serialization lib to set the stream precision before outputting a primitive type - to std::numeric_limits<T>::max_digits10 (or std::numeric_limits<T>::digits10+2 if max_digits10 is not available). However, I recognize that this is a difficult issue!
Would dumping the floating point value in hexadecimal format be a solution? I mean what %a does in C99 printf. Then we wouldn't lose any precision. Thanks, PM