It is George Marsaglia's multiply with carry pseudo-random number
generator. It has a period of 2^32, which is long enough for this
purpose. It is about as good as a 32-bit rng can be. In real life I
use the Mersenne Twister, but I wanted something simple to include
here.

Don

On Jan 29, 11:46 pm, Piyush Grover <[email protected]> wrote:
> @Don can you give the logic of your rnd() function?

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to