rand

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
BUGS
COPYRIGHT
AUTHOR

NAME

rand - function to generate uniformly distributed pseudo-random numbers.

SYNOPSIS

a=rand(r)

DESCRIPTION

Basic Seismic Utilities (BSU) includes this public domain fortran function to generate pseudo-random numbers (uniformly distributed 0<a<1). Period is 4194304 (about 4 million). This period can be extended significantly with function runif.
Fortran Version
.

Arguments
r (float)

Argument controls function behavior

r=0, then next number in random sequence returned

r>0, then acts as a seed to generate a new sequence

r<0, then last generated number returned for use in a restart

SEE ALSO

bnoise(3), runif(3), bnos(1)

BUGS

No known bugs.

COPYRIGHT

Public Domain

This program is public domain. It may be downloaded from the world wide web: http://gams.nist.gov/serve/cgi/PackageModules/CMLIB

AUTHOR

W. Fullerton (LANL)