Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: srand calls

by tenya (Beadle)
on Nov 04, 2001 at 00:43 UTC ( [id://123075]=note: print w/replies, xml ) Need Help??


in reply to Keep this in mind
in thread srand and seed

I am doing a Monte Carlo simulation; it does 100 trials. Each trial takes 30 seconds. I call rand 2e7 times during each trial. I need uniform random numbers; duplicates are ok. The random numbers are a population to draw from (I am modeling sampling error) and a source for the Perl Cookbook Gausian Random number generator (I am also modeling measurement error) Should I call srand between trials? It seems that 30s is enough time for the source of the seed to change. Will the quality of the random numbers degrade after too many calls (e.g., 2e9 calls?)? I use active perl with win2000 so Math::TrulyRandom is not an option for me.

Log In?
Username:
Password:

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

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

    No recent polls found