Next: Setting the seed (replacements for G05CBF and G05CCF)
Up: PDA [1ex
Previous: Replacing calls to G01DCF
Pseudo-Random Numbers
The routines for creating pseudo-random numbers in this library all
have a period of 2
and 6-7 digits accuracy. They are based
upon code by Ahrens, Dieter, & Grube. They use a multiplicative
congruential generator which is certainly not the state of the art
and may not be suitable for critical or sophisticated use.
The routines are:
- PDA_RAND (NETLIB/TOMS599)
Returns uniform pseudo-random numbers in the range 0 to 1.
- PDA_RNEXP (NETLIB/TOMS599)
Draws pseudo-random numbers from an exponential distribution.
- PDA_RNGAM (NETLIB/TOMS599)
Draws pseudo-random numbers from a Gamma-function distribution.
- PDA_RNNOR (NETLIB/TOMS599)
Draws pseudo-random numbers from a Normal distribution of specified
mean and standard deviation.
- PDA_RNPOI (NETLIB/TOMS599)
Draws pseudo-random numbers from a Poisson distribution of
specified mean.
- PDA_RNSED (NETLIB/TOMS599)
Sets the seed. This must be called before any of the other
random-number routines.
Subsections
Next: Setting the seed (replacements for G05CBF and G05CCF)
Up: PDA [1ex
Previous: Replacing calls to G01DCF
PDA [1ex
Starlink User Note 194
H. Meyerdierks, D. Berry, P. W. Draper, G. Privett, M. Currie
12th October 2005
E-mail:ussc@star.rl.ac.uk
Copyright © 2009 Science and Technology Facilities Council