# Category : Miscellaneous Language Source Code

Archive : FORTRN77.ZIP

Filename : STBNPB.FOR

C

C BINOMIAL PROBABILITY DISTRIBUTION SUBROUTINE.

C

IF (M.GE.N) GO TO 30

IF (M.LT.0) GO TO 20

IF (M.EQ.0) GO TO 40

T = P**N

Q1 = (1.0 - P)/P

P1 = T

XNP1 = N + 1

XK = 0.0

DO 10 K = 1,M

XK = XK + 1.0

T = T*Q1*(XNP1 - XK)/XK

10 P1 = P1 + T

RETURN

20 P1 = 0.0

RETURN

40 P1 = P**N

RETURN

30 P1 = 1.0

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/