in reply to Re: is rand random enough to simulate dice rolls?
in thread is rand random enough to simulate dice rolls?

> At least old perls for Windows had a very limited PRNG, with an interval of only 2^14 (?).

Having an interval of 2**14 ~= 16_000 means the sequence repeats.

> I've no idea how evenly distributed its output is/was.

By definition it must hit the average 3.5 exactly after 2**14 runs.°

IMHO 10000 runs for a margin of ± 0.2 is a safe bet. ²

If this test fails, something must be done.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

°) modulo rounding errors with Perl floats

²) that's more than 3% of the interval!