"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The rand function is supposed to be a "Pseudorandom number generator".
And the requirements for PRNG's are mathematically defined. One of them says, that for every range epsilon ε around the expected average P(E) you can find a minimum set size N such that the actual average will always be within that range. That's math-speak for "the bigger the closer". And that's very similar to your test, with the exception that there is no guaranty about this set size 10000. Could be less, could be more. From my tests it's very likely to hold for 10000 tho, but you can only be "sure"° after checking the implementation. HTH! :)
Cheers Rolf °) DISCLAIMER: security is relative if it comes to software and it's implementation In reply to Re: is rand random enough to simulate dice rolls? (math definition)
by LanX
|
|