Routine ID: V105 | |
---|---|
Author(s): T. Lindelöf, F. James | Library: MATHLIB |
Submitter: | Submitted: 15.06.1976 |
Language: CDC: Compass, IBM: Fortran | Revised: |
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
CALL NRANIN(SEED)presets the above-mentioned quantity to SEED. SEED may be any number of the form
Method:
Multiplicative congruential method with the multiplier . The sequence generated is independent of that of RNDM (V104) so that both may be used together.
References: