RANDOM_NUMBER(3I) Last changed: 1-6-98
RANDOM_NUMBER - Returns pseudorandom numbers
CALL RANDOM_NUMBER ([HARVEST=]harvest)
UNICOS, UNICOS/mk, and IRIX systems
Fortran 90
The RANDOM_NUMBER intrinsic subroutine returns one pseudorandom number
or an array of pseudorandom numbers from the uniform distribution over
the range 0 <= x < 1. It accepts the following argument:
harvest Must be of type real. It is an output argument. It may be
a scalar or an array variable. It is set to contain
pseudorandom numbers from the uniform distribution in the
interval 0 <= x < 1.
On UNICOS and UNICOS/mk systems, harvest is 64 bits. On
IRIX systems, harvest is 32 bits.
The name of this intrinsic cannot be passed as an argument.
REAL X, Y(10,10)
! Initialize X with a pseudorandom number
CALL RANDOM_NUMBER(HARVEST=X)
CALL RANDOM_NUMBER(Y)
! X and Y contain uniformly distributed random numbers
RANDOM_SEED(3I), RANF(3I)
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
RANDOM_NUMBER(3I) Last changed: 1-6-98
RANDOM_NUMBER - Returns pseudorandom numbers
CALL RANDOM_NUMBER ([HARVEST=]harvest)
UNICOS, UNICOS/mk, and IRIX systems
Fortran 90
The RANDOM_NUMBER intrinsic subroutine returns one pseudorandom number
or an array of pseudorandom numbers from the uniform distribution over
the range 0 <= x < 1. It accepts the following argument:
harvest Must be of type real. It is an output argument. It may be
a scalar or an array variable. It is set to contain
pseudorandom numbers from the uniform distribution in the
interval 0 <= x < 1.
On UNICOS and UNICOS/mk systems, harvest is 64 bits. On
IRIX systems, harvest is 32 bits.
The name of this intrinsic cannot be passed as an argument.
REAL X, Y(10,10)
! Initialize X with a pseudorandom number
CALL RANDOM_NUMBER(HARVEST=X)
CALL RANDOM_NUMBER(Y)
! X and Y contain uniformly distributed random numbers
RANDOM_SEED(3I), RANF(3I)
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.
[ Back ]
|