V105: Arrays of Uniform Random Numbers

Author(s): T. Lindelöf, F. James Library: MATHLIB
Submitter: Submitted: 15.06.1976
Language: CDC: Compass, IBM: Fortran Revised:

tex2html_wrap86

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
tex2html_wrap_inline78 .
    CALL NRANIN(SEED)
presets the above-mentioned quantity to SEED. SEED may be any number of the form
tex2html_wrap_inline80 where y must be 1 or 5 and the x's any octal digits.

Method:

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

References:

  1. Computing 6, (1970) 121.
tex2html_wrap_inline84

Michel Goossens Wed Jun 5 08:31:37 METDST 1996