The rang of long is
For long, from -9223372036854775808 to 9223372036854775807, inclusive
Where as float values can be represented with float-extened-exponent,
which in tern effectively store larger numbers than long primitive range.
java implementation automatically decides where to use float-extened-exponent or not.
In your example, it does need to use float-extened-exponenet.
for example
float f =Long.MAX_VALUE;
System.out.println(f);//will print 9.223372E18
long l=24;
f=1;
System.out.println(f);//will print 24.0
There is a enough room in float-exponential format to store all the rang of long integers.