HP MLIB User's Guide Vol. 2 7th Ed.

Chapter 7 Miscellaneous Routines 611
VAX-compatible random numbers RAN
Notes Starting a sequence twice with the same value of iseed will produce the same
pseudorandom sequence.
You may have as many independent sequences going at a time as you desire by
having a different iseed for each one.
The subprograms treat iseed as an unsigned 32-bit quantity. To write it out for
later continuation of the same sequence, either use unformatted I/O statements
or write it out with an octal, unsigned integer, or hexadecimal format descriptor
of the form O11, SU,I10, or Z8, respectively.
Example Fill an array X that is 10 elements long with a sequence of pseudorandom
numbers using the scalar subprogram RAN.
INTEGER*4 ISEED,N
REAL*4 RAN,X(10)
ISEED = 1234 ! STARTING SEED
N = 10
DO I = 1, N
X(I) = RAN(ISEED)
END DO
This fills array X with the same sequence of pseudorandom numbers and also
returns the same final value of ISEED, as the “Example” on page 614 for RANV.