...
Conversion from int
or long
to float
, or long
to double
can lead to loss of precision (loss of least significant bits). No runtime exception occurs despite the loss. Also, see EXP08-J. Be aware of integer promotions in binary operators.
...
The significand part of a floating point
number can hold at most 23 bit values. Anything above this threshold is discarded due to precision loss, as is demonstrated in this compliant solution.
...