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.
|