
...
Widening conversions resulting from integer promotions preserve the overall magnitude of the number. However, promotions in which the operands are converted from a numeric type such as an integer
to a float
or a long
to a double
, are particularly pernicious (see INT33-J. Be careful while casting Do not cast numeric types to wider floating-point types without range checking for more details). These implicit casts can lead to an undesirable loss in precision.
...