Trailing-Edge
-
PDP-10 Archives
-
decuslib20-01
-
decus/20-0020/nordev.sta
There are 2 other files named nordev.sta in the archive. Click here to see a list.
5000' NAME--NORDEV
5010'
5020' DESCRIPTION--A SUBROUTINE WHICH GENERATES RANDOM NORMAL
5030' DEVIATES WITH MEAN 0 AND VARIANCE 1.
5040'
5050' SOURCE--UNKNOWN
5060'
5070' INSTRUCTIONS--THIS SUBROUTINE USES THE VARIABLES Z9,Z8, AND Z7.
5080' THE VARIABLE R0 IS THE DEVIATE. AVOID USING THESE VARAIBLES
5090' IN THE MAIN PROGRAM.
5100'
5110'
5120' * * * * * * SUBROUTINE * * * * * * *
5130'
5140 IF Z7 = 2.347 THEN 5210
5150 LET Z7 = 2.347
5160 LET Z9 = SQR(-2*LOG(RND))
5170 LET Z8 = 6.2831853*RND
5180 LET R0 = Z9*COS(Z8)
5190 LET Z9 = Z9*SIN(Z8)
5200 GOTO 5230
5210 LET R0 = Z9
5220 LET Z7 = 1
5230 RETURN