Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re(2): is rand() random

by FoxtrotUniform (Prior)
on Jun 19, 2002 at 15:36 UTC ( [id://175727]=note: print w/replies, xml ) Need Help??


in reply to Re: is rand() random
in thread is rand() random

    rand() uses (IIRC) the built-in rand() function on your platform.

More to the point, stdlib rand() functions tend to be abysmally poor at generating even remotely random numbers (for both statistical and cryptographic definitions of "random"). Math::Random and Math::TrulyRandom are both good places to look for randomness in Perl, but coding up your own PRNG isn't terribly taxing, and a lot of fun.

--
The hell with paco, vote for Erudil!
:wq

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-24 09:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found