Routine ID: V103 | |
---|---|
Author(s): T. Lindelöf | Library: MATHLIB |
Submitter: | Submitted: 18.10.1966 |
Language: Assembler or Fortran (IBM) | Revised: 01.02.1982 |
OBSOLETE
Please note that this routine has been obsoleted in CNL 218. 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: None. Use inline-code, e.g.,
DIMENSION A(100),IA(100) | |
CALL RANLUX(A,100) | |
DO 1 I = 1,100 | |
1 | IA(I)=NINT(A(I)) |
IRND01 generates pseudo random zeros and ones with .
Structure:
FUNCTION subprogram
User Entry Names: IRND01, IR01UT, IR01IN
Usage:
I = IRND01(DUMMY)generates a pseudo random binary digit ( 0 or 1) in I. DUMMY is ignored and unchanged.
The bits generated in subsequent calls are statistically independent but functionally dependent on a 'seed' which the user can retrieve or set as follows:
CALL IR01UT(SEED)sets SEED to the current value of the internal 'seed', and
CALL IR01IN(SEED)replaces the the current value of the internal 'seed' in IRND01 by SEED.
Notes:
The IBM version of IRND01 is just a simple interface to RNDM2
(V107) and rather slow.