Trailing-Edge
-
PDP-10 Archives
-
decus_20tap2_198111
-
decus/20-0026/gauss.doc
There are 2 other files named gauss.doc in the archive. Click here to see a list.
SUBROUTINE GAUSS
PURPOSE
COMPUTES A NORMALLY DISTRIBUTED RANDOM NUMBER WITH A GIVEN
MEAN AND STANDARD DEVIATION
USAGE
CALL GAUSS(IX,S,AM,V)
DESCRIPTION OF PARAMETERS
IX -IX MUST CONTAIN AN ODD INTEGER NUMBER WITH NINE OR
LESS DIGITS ON THE FIRST ENTRY TO GAUSS. THEREAFTER
IT WILL CONTAIN A UNIFORMLY DISTRIBUTED INTEGER RANDOM
NUMBER GENERATED BY THE SUBROUTINE FOR USE ON THE NEXT
ENTRY TO THE SUBROUTINE.
S -THE DESIRED STANDARD DEVIATION OF THE NORMAL
DISTRIBUTION.
AM -THE DESIRED MEAN OF THE NORMAL DISTRIBUTION
V -THE VALUE OF THE COMPUTED NORMAL RANDOM VARIABLE
REMARKS
THIS SUBROUTINE USES RANDU WHICH IS MACHINE SPECIFIC
SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
RANDU
METHOD
USES 12 UNIFORM RANDOM NUMBERS TO COMPUTE NORMAL RANDOM
NUMBERS BY CENTRAL LIMIT THEOREM. THE RESULT IS THEN
ADJUSTED TO MATCH THE GIVEN MEAN AND STANDARD DEVIATION.
THE UNIFORM RANDOM NUMBERS COMPUTED WITHIN THE SUBROUTINE
ARE FOUND BY THE POWER RESIDUE METHOD.