long l = 12464545L;
float f = l; (fine)
int i = l ; (Error)
if we see the how this magic happens as we know the answer lies in the floating point representation as in floating points values does not store directly they store in mainly mantis and exponent part so due to its exponent bit it can actually store a lot more values then a long
for Ex : suppose we have a number 100000000 if we represent in exponential form we will write 10^8 so this number store in 2 part
first part : 10
second part : 8
so this way it can store a lot more values than its same byte size variable