Random Number Generator


Paul E Condon
10-14-2002, 04:44 PM
Several months ago I selected a random number generator for a simulation project in biodiversity. Now I want to revisit that selection, but my memory fails me. I thought I found it in NR, but I can't find it there now.

The generator is linear congruential and uses the constants
modulus (m): 2^^48
mult. factor (a): 25214903917
add const. (c): 11

Please send me any clues as to where I might have found this.

Also, I remember seeing at the time a table of recommended values of a and c for various choises of m. Where might I find that again?

Thanks

Paul

William Vetterling
10-14-2002, 07:56 PM
I don't know the source of your current constants, but a table of constants for "quick and dirty" random number generators may be found in section 7.1 of Numerical Recipes. You can find a copy of the book for reference on-line by going to the Numerical Recipes home page and selecting "On Line Books".