Narrower primitive types can be cast to wider types without affecting the magnitude of numeric values. However, when the expressions are not strictfp (FLP03-J. Use the strictfp modifier for floating point calculation consistency), conversions from float
to double
may lose information about the overall magnitude of the converted value though the numeric value is preserved exactly (see JLS Section 5.1.2, Widening Primitive Conversion).
...