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

Re: is rand random enough to simulate dice rolls?

by jo37 (Deacon)
on Jan 03, 2021 at 14:56 UTC ( [id://11126203]=note: print w/replies, xml ) Need Help??


in reply to is rand random enough to simulate dice rolls?

For random numbers that need not be cryptographically secure, but shall be "a bit better" than rand I usually use the Mersenne Twister. It has a period of 2^19937 - 1 and can be seeded with up to 624 long integers.

Greetings,
-jo

$gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 06:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found