in reply to Weighted random numbers generator
this_seed = (last_seed * 69069) % 2 ** 32; (equation 1) this_random_number = this_seed / 2 ** 32; (equation 2)You may want to play with it, and see whether you can find a way to distribute the numbers weighted, and at the same time sacrifice less performance.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Weighted random numbers generator
by no_slogan (Deacon) on Mar 13, 2003 at 17:57 UTC | |
Re: Re: Weighted random numbers generator
by Eimi Metamorphoumai (Deacon) on Mar 13, 2003 at 17:44 UTC |