Re:Issues with porting C++ code to a 64-bit platform
by peripetylabs on Monday April 01, 2013 @05:09PM
(#5475947)
One way to avoid loss of precision in the conversion is to check if the number of digits in the integer is larger than the constant DBL_DIG (defined in <cfloat>) -- numbers with less digits than that constant can be safely converted to the 'double' type and back.
[ Parent
| on HN ]