Click to See Complete Forum and Search --> : Using MD 7.2 and trying to run a Fortran 77 random number generator


geckolabs
03-24-2001, 03:06 PM
Does anyone happen to know what random number generator fuction and the syntax the f77 compiler on MD7.2 uses? I have tried the following without success.

RAND()
RANF()
RAN()
RANDOM()
SRAND()
SRANDOM()
RANDOM_NUMBER()

Unfortunately none of these seem to work and I have a model due in a week for a radiation class that I need a random number generator for number between 0.0--->1.0 (REAL/FLOAT)

Please Help!
THANKS

f'lar
03-25-2001, 02:31 AM
Quote from my numerical methods book:
"in Fortran 90, the procedure RANDOM_NUMBER returns one or an array of uniformly distributed pseudorandom numbers in the interval[0,1) depending on whether the argument is a scalar variable or an array. The procedure RANDOM_SEED restarts or queries the pseudorandom number generator used by RANDOM_NUMBER."

It's fortran 90, but I think somethink like that would have been around in '77. That's the best I can give you.