Routine ID: V101 | |
---|---|
Author(s): See Method | Library: MATHLIB |
Submitter: T. Lindelöf | Submitted: 15.06.1976 |
Language: Assembler or Fortran (Cray) | Revised: 13.07.1988 |
OBSOLETE
Please note that this routine has been obsoleted in CNL 215. Users are
advised not to use it any longer and to replace it in older programs.
No maintenance for it will take place and it will eventually disappear.
Suggested replacement: RNORML or RNORMX (V120)
NORRAN generates a pseudo random number with normal (Gaussian) distribution, zero mean and unit variance. NORRAN is much faster than RANNOR (V100).
Structure:
SUBROUTINE subprogram
User Entry Names: NORRAN, NORRIN, NORRUT
Internal Entry Names: UNI, VNI (IBM only)
Usage:
CALL NORRAN(RANDOM)returns RANDOM (type REAL) as a pseudo random number in Gaussian distribution with zero mean and unit variance. The value returned in any particular call to NORRAN is statistically independent of earlier values. The sequence of values returned in subsequent calls is, however, functionally dependent on a 'seed' (two 'seeds' on 32 bits machines) which the user can extract or set as follows:
CALL NORRUT(SEED1,SEED2)SEED1 and SEED2 (on CDC and Cray SEED1 only) (type REAL) will be replaced by the current values (value) of the internal 'seeds' ('seed') in NORRAN.
CALL NORRIN(SEED1,SEED2)SEED1 and SEED2 (on CDC and Cray SEED1 only) (type REAL) replaces the current values (value) of the internal 'seeds' ('seed') in NORRAN.
Method:
CDC: See Ref. 1. IBM: See Ref. 2.
Notes:
NORRUT and NORRIN are called with two arguments, the second of which is unused (dummy) in the CDC and Cray versions of NORRAN. NORRIN should only be called with arguments set by a previous call to NORRUT. While NORRAN may function from arbitrary seed(s) its random behaviour may be unpredictable unless this restriction is observed.
References: