PDA_RNEXP

Returns pseudo-random numbers from an exponential distribution

Description:

This is a simple random-number generator providing deviates in the from an exponential distribution, with a period of 2$\ast$$\ast$26, and to 6 or 7 digits accuracy. It is based upon Ahrens, Dieter & Grube’s TOMS599 routines.

Invocation

RESULT = PDA_RNEXP( X )

Arguments

X = REAL (Given)
This is a dummy variable required by the Fortran standard.

Returned Value

PDA_RNEXP = INTEGER
The pseudo-random deviate.

Prior Requirements

The initial seed MUST be set using routine PDA_RNSED (equivalent to NAG’s G05CBF). If it has not, there is no guarantee that sensible values will be returned from this function.

References

Ahrens, J.H., & Dieter, U. 1972, "Computer Methods for sampling from the exponential and Normal distributions", Comm. ACM 15(10), pp.873–882.