Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
my point lies somewhere else, but you are correct: adding two 32-bit numbers may get you to, at most, a 33-bit number. Read that as "add thirty-two 32-bit rands()" (Gaussian distribution) or "multiply two 32-bit rands()" (uniform-product distribution). Adding is just one form of combining two values but it's perfect to demonstrate the caveats of "combining" rand()s and that not all forms of "combining" rand()s lead to the desirable effect. bliakoIn reply to Re^3: how to get a 64bit random number with rand() ?
by bliako
|
|