in reply to Random Math Question
I think MJD's objection to the generator is that, if you're shuffling 100,000 elements, you need a generator that can give you a random number between 1 and 100,000. If your generator doesn't have that, you can start with two random numbers, and use them as separate seeds. Each time you need a big random number, you get two small ones (which also become your two new seeds). You combine the two small random numbers into one big random number.
You can do tricks (skip a number occasionally) to keep them from having synchronized repetitions, and you can vary your method of combining them, to help eliminate patterns.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Random Math Question
by Limbic~Region (Chancellor) on Oct 10, 2005 at 22:29 UTC | |
by BrowserUk (Patriarch) on Oct 10, 2005 at 23:59 UTC | |
by jdporter (Paladin) on Oct 11, 2005 at 04:37 UTC | |
Re: Random Math Question
by Dominus (Parson) on Oct 11, 2005 at 01:16 UTC |