home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
DOOG
/
PCSSP1.ZIP
/
GAUQUAD.ZIP
/
DQG32.FOR
< prev
next >
Wrap
Text File
|
1985-11-29
|
3KB
|
78 lines
C
C ..................................................................
C
C SUBROUTINE DQG32
C
C PURPOSE
C TO COMPUTE INTEGRAL(FCT(X), SUMMED OVER X FROM XL TO XU)
C
C USAGE
C CALL DQG32 (XL,XU,FCT,Y)
C PARAMETER FCT REQUIRES AN EXTERNAL STATEMENT
C
C DESCRIPTION OF PARAMETERS
C XL - DOUBLE PRECISION LOWER BOUND OF THE INTERVAL.
C XU - DOUBLE PRECISION UPPER BOUND OF THE INTERVAL.
C FCT - THE NAME OF AN EXTERNAL DOUBLE PRECISION FUNCTION
C SUBPROGRAM USED.
C Y - THE RESULTING DOUBLE PRECISION INTEGRAL VALUE.
C
C REMARKS
C NONE
C
C SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
C THE EXTERNAL DOUBLE PRECISION FUNCTION SUBPROGRAM FCT(X)
C MUST BE FURNISHED BY THE USER.
C
C METHOD
C EVALUATION IS DONE BY MEANS OF 32-POINT GAUSS QUADRATURE
C FORMULA, WHICH INTEGRATES POLYNOMIALS UP TO DEGREE 63
C EXACTLY. FOR REFERENCE, SEE
C V.I.KRYLOV, APPROXIMATE CALCULATION OF INTEGRALS,
C MACMILLAN, NEW YORK/LONDON, 1962, PP.100-111 AND 337-340.
C
C ..................................................................
C
SUBROUTINE DQG32(XL,XU,FCT,Y)
C
C
DOUBLE PRECISION XL,XU,Y,A,B,C,FCT
C
A=.5D0*(XU+XL)
B=XU-XL
C=.49863193092474078D0*B
Y=.35093050047350483D-2*(FCT(A+C)+FCT(A-C))
C=.49280575577263417D0*B
Y=Y+.8137197365452835D-2*(FCT(A+C)+FCT(A-C))
C=.48238112779375322D0*B
Y=Y+.12696032654631030D-1*(FCT(A+C)+FCT(A-C))
C=.46745303796886984D0*B
Y=Y+.17136931456510717D-1*(FCT(A+C)+FCT(A-C))
C=.44816057788302606D0*B
Y=Y+.21417949011113340D-1*(FCT(A+C)+FCT(A-C))
C=.42468380686628499D0*B
Y=Y+.25499029631188088D-1*(FCT(A+C)+FCT(A-C))
C=.39724189798397120D0*B
Y=Y+.29342046739267774D-1*(FCT(A+C)+FCT(A-C))
C=.36609105937014484D0*B
YY=Y+.53722135057982817D-1*(FCT(A+C)+FCT(A-C))
C=.21689675381302257D0*B
Y=Y+.57752834026862801D-1*(FCT(A+C)+FCT(A-C))
C=.15752133984808169D0*B
Y=Y+.60835236463901696D-1*(FCT(A+C)+FCT(A-C))
C=.9555943373680815D-1*B
Y=Y+.62918728173414148D-1*(FCT(A+C)+FCT(A-C))
C=.32028446431302813D-1*B
Y=B*(Y+.63969097673376078D-1*(FCT(A+C)+FCT(A-C)))
RETURN
END
U-XL).
C FOR REFERENCE, SEE
C (1) FILIPPI, DAS VERFAHREN VON ROMBERG-STI+.46922199540402283D-1*(FCT(A+C)+FCT(A-C))
C=.7223598079139825D-1*B
Y=Y+.47819360039637430D-1*(FCT(A+C)+FCT(A-C))
C=.24153832843869158D-1*B
Y=B*(Y+.48270044257363900D-1*(FCT(A+C)+FCT(A-C)))
RETURN
END