Stevica's analysis would be correct if a and l were final. Since they are not final, the compiler can not rely on the initial values and must consider all possible values.
The javac error message "possible loss of precision" is misleading because the rules on casting fom an integer type to a floating point type are based on magnitude, not precision.
Java considers conversion from any integer type to any floating point to be a widening conversion not requiring an explicit cast because there may be a loss of precision but there is no loss of overall magnitude.
A float can easily hold the largest possible long. A long goes up to 2^63-1. A float can at least hold up to 2^127.
This is from section 5.1.2 of the Java Language Specification:
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).