No such thing as a small change | |
PerlMonks |
Re^3: how to get a 64bit random number with rand() ?by bliako (Monsignor) |
on Mar 22, 2018 at 23:25 UTC ( [id://1211570]=note: 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. bliako
In Section
Seekers of Perl Wisdom
|
|