Retrieves the current value of the seed used in the IMSL random number generators.
ISEED — The seed of the random number
generator. (Output)
ISEED
is in the range (1, 2147483646).
Generic: CALL RNGET (ISEED)
Specific: The specific interface name is RNGET.
Single: CALL RNGET (ISEED)
Routine RNGET retrieves the current value of the “seed” used in the IMSL random number generators. A reason for doing this would be to restart a simulation, using RNSET to reset the seed.
The following FORTRAN statements illustrate the use of RNGET:
INTEGER ISEED
! Call RNSET to initialize the seed.
CALL RNSET(123457)
! Do some simulations.
...
...
CALL RNGET(ISEED)
! Save ISEED. If the simulation is to be continued
! in a different program, ISEED should be output,
! possibly to a file.
...
...
! When the simulations begun above are to be
! restarted, restore ISEED to the value obtained
! above and use as input to RNSET.
CALL RNSET(ISEED)
! Now continue the simulations.
...
...
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |