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
In reply to Re: is rand random enough to simulate dice rolls?
by afoken
in thread is rand random enough to simulate dice rolls?
by Discipulus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |