[Haskell-cafe] New seed. New random number. Right? Wrong.
Bryan O'Sullivan
bos at serpentine.com
Thu Oct 8 17:40:02 EDT 2009
On Thu, Oct 8, 2009 at 1:15 PM, michael rice <nowgate at yahoo.com> wrote:
>
> Where am I going wrong?
>
Your seeds are all extremely close together. The System.Random PRNG takes a
32-bit seed, but your seeds haven't even got a 17-bit range, so you're
supplying approximately 19 parts per million of the possible range of
entropy. Evidently this PRNG doesn't fare well with such a small amount of
entropy.
Try providing a broader range of seeds, and you'll see better results, e.g.
877554827
3377950428
3850407650
688135636
1134078904
973676998
3178940608
840705211
185598244
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091008/a505ac20/attachment.html
More information about the Haskell-Cafe
mailing list