I have been studying floating point precision, and I came across double precision. I understand already that there are 1 bit reserved for the sign, 11 bits reserved for the exponent, and 52 bits reserved for the significand.
I'm trying to figure out the difference between any two consecutive values in floating point precision. From what I am seeing, there are 2^52 values between any two powers of 2.
Now, I am seeing some resources that show this pattern for the values between 2 and 4:
$2, 2+2^{-51}, 2+2*2^{-51}, 2+3*2^{-51}, ... 4$
But I cannot seem to figure out the pattern here. I know that the spacing between the numbers is supposed to follow an geometric sequence (difference between consecutive values is multiplied by a factor), but the above pattern I see seems to follow an arithmetic sequence (difference between consecutive values is added, i.e. $2^{-51}$ in this case)
If the above pattern is correct, then that would mean the largest gap between any two values that are between powers of 2 is $2^{-51}$, but I think that can't be right.
What is the pattern for the difference between consecutive values in double precision?
For numbers $2^0=1\le x < 2=2^1$ the spacing is the machine epsilon $\epsilon = 2^{-52}$, for numbers $2^1=2\le x < 4=2^2$ numbers the spacing is $ 2\epsilon = 2^{-52+1} = 2^{-51}$ etc.