Random question (sorry): What is the probability of a MT19937-based pRNG *actually* returning 0.0 on rand()?
-
-
0.0 is one of 16777216 (2^24) possible significand states for a single precision IEEE 754 number; 2^237 for octuple precision (max). The algorithms Elijah mentioned restrict that further, but for single precision, if you're doing a lot of rng stuff, not impossible.
-
But is there any guarantee the something like MT19937 needs to visit that state?
- 4 more replies
New conversation -
-
-
RNGs are typically implemented in terms of a linear function with mods to bound them. Arithmetic on floats makes the equality difficult.
-
So I don't think a perfect 0.0 will _ever_ occur.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.