next up previous index
Next: V106 Machine-Independent Uniform Up: CERNLIB Previous: V104 Uniform Random

V105 Arrays of Uniform Random Numbers

Routine ID: V105
Author(s): T. Lindelöf, F. JamesLibrary: MATHLIB
Submitter: Submitted: 15.06.1976
Language: CDC: Compass, IBM: FortranRevised:

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:
RANMAR (V113) or RANECU (V114) or RANLUX (V115)

NRAN on CDC is about 4 times faster than RNDM when 'many' uniformly distributed random numbers are to be generated at once.

NRAN on IBM is not recommended. It is merely a Fortran interface to RNDM. Thus this description applies only to the CDC version.

Structure:

SUBROUTINE subprogram
User Entry Names: NRAN, NRANIN, NRANUT

Usage:

    CALL NRAN(VEC,N)
fills the array VEC (of length N at least) with N independent pseudo random numbers uniformly distributed in the interval (0,1), the end-points excluded. The other two entries may be used to retrieve and set the 'seed' as follows:
    CALL NRANUT(SEED)
returns in SEED the current value of a quantitity which is changed after each call to NRAN and upon which the future random number sequence depends. Its initial default value is
171700000000000000018 .
    CALL NRANIN(SEED)
presets the above-mentioned quantity to SEED. SEED may be any number of the form
1717xxxxxxxxxxxxxxxy8 where y must be 1 or 5 and the x's any octal digits.

Method:

Multiplicative congruential method with the multiplier 200011706736334577258 . The sequence generated is independent of that of RNDM (V104) so that both may be used together.

References:

  1. Computing 6, (1970) 121.

V106



next up previous index
Next: V106 Machine-Independent Uniform Up: CERNLIB Previous: V104 Uniform Random


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