SUBROUTINE DQK21(F,A,B,RESULT,ABSERR,RESABS,RESASC) C***BEGIN PROLOGUE DQK21 C***DATE WRITTEN 800101 (YYMMDD) C***REVISION DATE 830518 (YYMMDD) C***CATEGORY NO. H2A1A2 C***KEYWORDS 21-POINT GAUSS-KRONROD RULES C***AUTHOR PIESSENS, ROBERT, APPLIED MATH. AND PROGR. DIV. - C K. U. LEUVEN C DE DONCKER, ELISE, APPLIED MATH. AND PROGR. DIV. - C K. U. LEUVEN C***PURPOSE To compute I = Integral of F over (A,B), with error C estimate C J = Integral of ABS(F) over (A,B) C***DESCRIPTION C C Integration rules C Standard fortran subroutine C Double precision version C C PARAMETERS C ON ENTRY C F - Double precision C Function subprogram defining the integrand C FUNCTION F(X). The actual name for F needs to be C Declared E X T E R N A L in the driver program. C C A - Double precision C Lower limit of integration C C B - Double precision C Upper limit of integration C C ON RETURN C RESULT - Double precision C Approximation to the integral I C RESULT is computed by applying the 21-POINT C KRONROD RULE (RESK) obtained by optimal addition C of abscissae to the 10-POINT GAUSS RULE (RESG). C C ABSERR - Double precision C Estimate of the modulus of the absolute error, C which should not exceed ABS(I-RESULT) C C RESABS - Double precision C Approximation to the integral J C C RESASC - Double precision C Approximation to the integral of ABS(F-I/(B-A)) C over (A,B) C***REFERENCES (NONE) C***ROUTINES CALLED D1MACH C***END PROLOGUE DQK21