I was expecting this to be about getting a consistent random distribution across the [-1.8*10^308, 1.8*10^308] 64 bit floating point range.
[-1.8*10^308, 1.8*10^308]
It would be interesting to account for the increasing ULP as the mantissa consumes more and more of the precision
“Random float” is itself an ambiguous concept. Here it’s defined as a 53-bit integer, but one could also expect a random value between 0 and 1.
No, the function in the article returns a number between 0 and 1. It generates a 53-bit int and then divides it by 2^53.
Oh, right. :facepalm:
I was expecting this to be about getting a consistent random distribution across the
[-1.8*10^308, 1.8*10^308]
64 bit floating point range.It would be interesting to account for the increasing ULP as the mantissa consumes more and more of the precision
“Random float” is itself an ambiguous concept. Here it’s defined as a 53-bit integer, but one could also expect a random value between 0 and 1.
No, the function in the article returns a number between 0 and 1. It generates a 53-bit int and then divides it by 2^53.
Oh, right. :facepalm: