[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[altq 1221] Re: Random number generator
Nguyen-Tuong Long Le wrote:
> > What makes you think random() isn't good enough for this purpose?
> There is a paper entitled "Software for Uniform Random Number
> Generation: Distinguishing the Good and the Bad" by Pierre L'Ecuyer
> (available from www.iro.umontreal.ca./~lecuyer/myftp/papers/wsc01rng.pdf)
> that claims that the algorithm LCG16807 used by random() is not
> a good one.
Thanks for the pointer.
> I did a quick test that shows that if the drop probability of 0.05 is
> applied to 1000 samples, the real loss rate can be anywhere from 0.037
> to 0.064 and doesn't come close to the nominal value half of the times.
> -- Long
I also did a quick test. The result is good when I use 1,000,000
samples (since 1,000 is too small to test stochastic properties).
-Kenjiro