# Category : Miscellaneous Language Source Code

Archive : FORTRN77.ZIP

Filename : STNGBI.FOR

C

C THIS SUBROUTINE COMPUTES THE PROBABILITY AND CUMULATIVE

C DISTRIBUTION OF NEGATIVE BINOMIAL DISTRIBUTION OF THE FORM

C DF(KK,I,P)=C(I+KK-1.,KK)*P**I*(1.-P)**KK FOR ARBITRARY FIXED

C INTEGER I GREATER THAN ZERO AND P IN THE INTERVAL 0 TO 1.

C

RI = I

CF = P**I

DF = CF

IF(KK) 10,10,11

11 DO 1 K = 1,KK

SKK = K

S1 = 1.

DO 2 J = 1,K

FJ = J

T = RI + SKK - FJ

2 S1 = S1*T

S2 = 1

DO 3 L = 1,K

FL = L

3 S2 = S2*FL

DF = S1/S2*(P**I*(1.-P)**K)

CF = CF + DF

1 CONTINUE

10 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/