![]() |
|
more useful options | |
PerlMonks |
Re: Random sampling a variable record-length file.by toma (Vicar) |
on Dec 27, 2009 at 04:31 UTC ( #814478=note: print w/replies, xml ) | Need Help?? |
If you need statistically valid random numbers, don't use perl's rand(), it is not good for this purpose. It has patterns in it that will invalidate your results. I ran into this when I did a Monte Carlo simulation, and I was amazed at how bad the problem really is. I tried several other algorithms for generating random numbers. Randomness turns out to be harder than it looks. Any one who considers arithmetical methods of producing random digits is, of course, in a state of sin. —John von Neumann See www.random.org for true random numbers. It should work perfectly the first time! - toma
In Section
Seekers of Perl Wisdom
|
|