The widening conversion from long to float is authorized, but it is not without consequences. Here is what
JLS 5.1.2 Widening Primitive Conversion has to say about it:
Conversion of an int or a long value to float, or of a long value to double, may result in loss of precision-that is, the result may lose some of the least significant bits of the value. In this case, the resulting floating-point value will be a correctly rounded version of the integer value, using IEEE 754 round-to-nearest mode (�4.2.4).