Working with string representations of floating point values can produce incorrect conclusions about the precision of the values. For example, consider the conversion of a value from type float
to type double
, a widening primitive conversion. Refer to the guideline FLP10-J. Do not cast primitive integer types Beware of precision lost when casting primitive integers to floating-point types without range checks for more details about such conversions.
...