Random question (sorry): What is the probability of a MT19937-based pRNG *actually* returning 0.0 on rand()?
-
-
-
Replying to @terrible_coder
Is it though? Every manual makes a point to note that 0 is inclusive. I assume someone did the analysis. But, I've never seen an estimate of the probability.
1 reply 0 retweets 0 likes -
Replying to @generativist @terrible_coder
Er, not estimate -- analytical result.
1 reply 0 retweets 0 likes -
Replying to @generativist
Depends on how you define "returning 0.0" since equality isn't incredibly well-defined on floats.
1 reply 0 retweets 1 like -
Replying to @terrible_coder
IIRC, it is for 0.0 given IEEE 754 floats.
2 replies 0 retweets 0 likes -
Replying to @generativist
RNGs are typically implemented in terms of a linear function with mods to bound them. Arithmetic on floats makes the equality difficult.
1 reply 0 retweets 0 likes -
Replying to @terrible_coder @generativist
So I don't think a perfect 0.0 will _ever_ occur.
1 reply 0 retweets 1 like
I just can't imagine such a glaring oversight exists in every manual though. Like sure, "Nearly All Binary Searches Are Broken," but physicist tend to fix numerical assumptions...
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.