Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re(2): is rand() random

by FoxtrotUniform (Prior)
on Jun 19, 2002 at 15:36 UTC ( #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
Node Status?
node history
Node Type: note [id://175727]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2021-01-20 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?