4 ms·
If we're using a uniform random number generator in [0, 1] with 32-bit IEEE754 numbers, the closest to 0.3639401 is 2^-2 * (1 + 3823195*2^-23) = 0.36394008
by nightcracker 9y ago
If we're using a uniform random number generator in [0, 1] with 32-bit IEEE754 numbers, the closest to 0.3639401 is
2^-2 * (1 + 3823195*2^-23) = 0.3639400899410247802734375
The numbers directly before and after it are:
2^-2 * (1 + 3823194*2^-23) = 0.363940060138702392578125
2^-2 * (1 + 3823196*2^-23) = 0.36394011974334716796875
Giving a range of size 2.980232238769531250 * 10^-8 in which all numbers compare equal to 0.3639401 in IEEE754 32-bit floating point. And since we're looking at a domain of [0, 1], that's also immediately our probability.
(I'm fully aware this isn't what you were asking, but I found it fun either way)