next up previous index
Next: V101 Fast Random Up: CERNLIB Previous: U501 Beta-Term in

V100 Random Numbers in Normal Distribution

Routine ID: V100
Author(s): M.K. DownieLibrary: KERNLIB
Submitter: H. von EickenSubmitted: 01.03.1968
Language: FortranRevised: 15.09.1978

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)

RANNOR generates pairs of independent random numbers in normal distribution with zero mean and unit variance. RANNOR is considerably slower than NORRAN (V101) and should not be used to generate single random numbers.

Structure:

SUBROUTINE subprogram
User Entry Names: RANNOR
External References: RNDM (V104)

Usage:

    CALL RANNOR(A,B)
stores two random numbers with normal distribution into A and B (type REAL).

Method:

The routine generates two independent normal deviates, a and b, with each execution:
a = sin(2πx)-2 lny

b = cos(2πx)-2 lny,

where x and y are random numbers, uniformly distributed in (0,1), obtained from RNDM (V104).

References:

  1. Box and Muller, Ann. Math. Statistics 29 (1958).

V101


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995