Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: is rand random enough to simulate dice rolls?

by haukex (Bishop)
on Jan 04, 2021 at 13:20 UTC ( #11126272=note: print w/replies, xml ) Need Help??


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

Note that you don't really need the two ok's in the else since the conditions have already been tested, and in fact they may fail in case $avg==3.4 or $avg==3.6. You could just do else { pass "average randomness ok (3.4 < 10000d6 / 10000 < 3.6)" } instead.

Replies are listed 'Best First'.
Re^4: is rand random enough to simulate dice rolls?
by Discipulus (Abbot) on Jan 04, 2021 at 13:57 UTC
    yes :) I was tempted to put there a  ok ( 1, "average randomness ok.. but seemed stupid. I forgot the pass option. Thanks

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11126272]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2021-04-13 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?