# Category : Miscellaneous Language Source Code

Archive : FORTRN77.ZIP

Filename : NORNG.FOR

C

C THIS SUBROUTINE GENERATES A SEQUENCE OF NUMBERS NORMALLY

C AND RANDOMLY DISTRIBUTED OVER THE INTERVAL -3 TO 3 FROM

C UNIFORMLY DISTRIBUTED RANDOM NUMBERS BY THE METHOD OF LINEAR

C APPROXIMATION TO THE INVERSE OF THE ACCUMULATIVE

C NORMAL DISTRIBUTION FUNCTION.

C

DIMENSION Y(6), X(6), S(5)

DATA Y/0.,.0228,.0668,.1357,.2743,.5/,

&X/-3.01,-2.0,-1.5,-1.0,-.6,0./,

&S/43.8596,11.3636,7.25689,2.891352,2.65887/

CALL STRNUM(R)

P = R

I = 1

IF (P.GT.0.5) P = 1.0-R

2 IF (P.LT.Y(I + 1)) GO TO 8

I = I + 1

GO TO 2

8 P = ((P-Y(I))*S(I) + X(I))

IF (R.GE.0.5) P = -P

RETURN

END

Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/