Category : Miscellaneous Language Source Code
Archive   : FORTRN77.ZIP
Filename : STBETA.FOR

 
Output of file : STBETA.FOR contained in archive : FORTRN77.ZIP
SUBROUTINE STBETA (N,M,X,H,S)
C
C THIS SUBROUTINE COMPUTES THE DENSITY FUNCTION DF = X**(M-1)*
C (1-X)**(N-1)/B(M,N) AND CUMLATIVE FUNCTION OF BETA DISTRIBUTION.
C
FN = N
FM = M
S = X**M/FM
FS = 1
DO 1 I = 1,1000
FI = I
FS = FS*(FN - FI)
FS = FS/FI
HH = (-1.)**I
HH = HH*X**(M + I)/(FM + FI)
HH = HH*FS
S = S + HH
IF (FN - FI) 1,2,1
1 CONTINUE
2 S1 = 1./FM
FS1 = 1
DO 4 I = 1,1000
FI = I
FS1 = FS1*(FN - FI)
FS1 = FS1/FI
H1 = (-1.)**I/(FM + FI)
H1 = H1*FS1
S1 = S1 + H1
IF (FN - FI) 4,5,4
4 CONTINUE
5 S = S/S1
S2 = X**(FM - 1.)
FS2 = 1
DO 6 I = 1,1000
FI = I
FS2 = FS2*(FN - FI)
FS2 = FS2/FI
H2 = (-1.)**I
H2 = H2*X**(FM + FI - 1.)
H2 = H2*FS2
S2 = S2 + H2
IF (FN - FI) 6,7,6
6 CONTINUE
7 H = S2/S1
RETURN
END


  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : FORTRN77.ZIP
Filename : STBETA.FOR

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

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

  3. 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/