Routine ID: G900 | |
---|---|
Author(s): CDC | Library: KERNLIB or Fortran intrinsic |
Submitter: H. Lipps (not CDC or Cray) | Submitted: 02.06.1980 |
Language: Fortran or Assembler | Revised: 24.06.1985 |
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)
Function subprograms RANF and DRANF return pseudo-random values uniformly distributed in the interval (0,1), the end points excluded. The multiplicative congruential method is used.
Subroutine subprogram RANGET makes the current seed value of RANF and DRANF available to the user, and subroutine RANSET restores a seed value for further use by RANF and DRANF.
On CDC computers, the subprograms other than DRANF are part of Control Data's Fortran execution-time library.
The non-CDC versions of RANF and DRANF use the same multiplier ( 2875 A2E7 B175), the same initial seed value ( 2BC6 8CFE 166D), and the same modulus ( 2**48). They thus generate, within the limitations of machine accuracy, the same random sequence as the CDC versions.
DRANF is identical to RANF except that it returns a function value of type DOUBLE PRECISION.
Structure:
SUBROUTINE and FUNCTION subprograms
User Entry Names: RANF, DRANF, RANGET,
RANSET
Usage:
In any arithmetic expression, RANF() or DRANF()
is set to a value greater than zero and less than one. RANF is of type REAL, DRANF is of type DOUBLE PRECISION.
CALL RANGET(SEED) CALL RANSET(SEED)
References: