|
Vernon, See inline comments... Peter. ----- Original Message ----- From: "Vernon Hamberg" <vhamberg@attbi.com> To: <midrange-l@midrange.com> Sent: Tuesday, September 17, 2002 8:45 AM Subject: Re: ceerano and the seed > Peter > > Would it make sense to treat a user-supplied seed the same way, since it is > limited to a 4-byte signed integer? Hopefully the user is better at picking a prime number than the computer. > BTW, what does the expression "multiplicative congruential" mean? The first > word is simple enough. Are all forms of this kind of generator essentially > the same, just different constants? I've seen things on the net about > 2^31-1 and 2^61-1 (or something like that) Multiplicative because each seed is a linear function of the previous seed (with the overflow thrown away). Congruential because the random number is determined by taking the modulus (2 ^ 31) - 1 of the of the new seed. Or something like that. Multiplicative Congruential is just one type of random number generator. There are many types. > I seem to recall problems with skewed distributions when generating > integers between 2 values. Does this "bucketizing" diminish the quality of > the distribution? The random number generator actually returns values > between 0 and 1. I think the bucketizing is the result of a poor seed. Bucketizing would certainly diminish the quality of the distribution.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.