VMS Help  —  FORTRAN  Intrinsic Procedures, RANDU
  RANDU (integer-1, integer-2, store)

  Class:  Subroutine

  Computes a pseudorandom number as a single-precision value.

  The integer arguments must be INTEGER(KIND=2) variables or array
  elements that contain the seed for computing the random number.
  The new seed for computing the next random number is stored into
  these integer arguments.  The "store" is a REAL(KIND=4) variable or
  array element where the computed random number is returned.

  The result is returned in "store", which must be of type
  REAL(KIND=4).  The result value is a pseudorandom number in the
  range 0.0 to 1.0.  The algorithm for computing the random number
  value is based on the values for "integer-1" and "integer-2".

  Example:

  Consider the following:

  REAL X
  INTEGER(2) I, J
  ...
  CALL RANDU (I, J, X)

  If I and J are values 4 and 6, X stores the value 5.4932479E-04.
Close Help