in reply to is rand random enough to simulate dice rolls?
While the above seems to be ok on my platform, can I expect the same result on every platform? and for every perl version around the world?
At least old perls for Windows had a very limited PRNG, with an interval of only 2^14 (?). I've no idea how evenly distributed its output is/was. So, the quality of rand() differs from platform to platform and may also change with the perl version.
Should I repeat the check 100 times to have an average of averages?
Averaging averages won't help. After all, you just sum up n*m numbers and divide by n*m - either in n steps or all at once. Using the median of n averages might help.
Update:
See also Random numbers are not random enough on Windows and https://www.effectiveperlprogramming.com/2014/06/perl-5-20-uses-its-own-random-number-generator/.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: is rand random enough to simulate dice rolls?
by LanX (Saint) on Jan 03, 2021 at 16:33 UTC |