home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
DOOG
/
PCSSP1.ZIP
/
GLGRQUAD.ZIP
/
QL8.FOR
< prev
next >
Wrap
Text File
|
1985-11-29
|
2KB
|
56 lines
C
C ..................................................................
C
C SUBROUTINE QL8
C
C PURPOSE
C TO COMPUTE INTEGRAL(EXP(-X)*FCT(X), SUMMED OVER X FROM 0
C TO INFINITY).
C
C USAGE
C CALL QL8 (FCT,Y)
C PARAMETER FCT REQUIRES AN EXTERNAL STATEMENT
C
C DESCRIPTION OF PARAMETERS
C FCT - THE NAME OF AN EXTERNAL FUNCTION SUBPROGRAM USED.
C Y - THE RESULTING INTEGRAL VALUE.
C
C REMARKS
C NONE
C
C SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
C THE EXTERNAL FUNCTION SUBPROGRAM FCT(X) MUST BE FURNISHED
C BY THE USER.
C
C METHOD
C EVALUATION IS DONE BY MEANS OF 8-POINT GAUSSIAN-LAGUERRE
C QUADRATURE FORMULA, WHICH INTEGRATES EXACTLY WHENEVER
C FCT(X) IS A POLYNOMIAL UP TO DEGREE 15.
C FOR REFERENCE, SEE
C V.I.KRYLOV, APPROXIMATE CALCULATION OF INTEGRALS,
C MACMILLAN, NEW YORK/LONDON, 1962, PP.130-132 AND 347-352.
C
C ..................................................................
C
SUBROUTINE QL8(FCT,Y)
C
C
X=22.86313
Y=.1048001E-8*FCT(X)
X=15.74068
Y=Y+.8485747E-6*FCT(X)
X=10.75852
Y=Y+.9076509E-4*FCT(X)
X=7.045905
Y=Y+.2794536E-2*FCT(X)
X=4.266700
Y=Y+.03334349*FCT(X)
X=2.251087
Y=Y+.1757950*FCT(X)
X=.9037018
Y=Y+.4187868*FCT(X)
X=.1702796
Y=Y+.3691886*FCT(X)
RETURN
END