I'm trying to understand if the exponent should be larger than 2^52 for the 64 bit floating point to always get integer. It seems so to me. Here is my reasoning:
If mantissa has 52 bits, then the number stored is the following:
1.0000000000000000000000000000000000000000000000000000
then we need to move the floating point to the right 52 places to get an integer. If we move it less number of places, for example, 51, then we can end up with a fractional part. For example, for the number
1.0000000000000000000000000000000000000000000000000001 x 2^51
it will be
2251799813685248.5
It seems that to get an integer we need to move the floating point by the number of places depending where the last value 1
is found. For example, if it's in the 30th bit, then we need to have an exponent equal to 30 (230).
Is my logic correct?