DGAUS8(3)

SYNOPSIS
SUBROUTINE DGAUS8 (FUN, A, B, ERR, ANS, IERR)

NAME
dgaus8 - Integrate a real function of one variable over a finite interval using an adaptive 8-point Legendre-Gauss algorithm. Intended primarily for high accuracy integration or integration of smooth functions.

LIBRARY
SLATEC

CATEGORY
H2A1A1

TYPE
DOUBLE PRECISION (GAUS8-S, DGAUS8-D)

KEYWORDS
ADAPTIVE QUADRATURE, AUTOMATIC INTEGRATOR, GAUSS QUADRATURE, NUMERICAL INTEGRATION

AUTHOR
Jones, R. E., (SNLA)

DESCRIPTION
Abstract *** a DOUBLE PRECISION routine *** DGAUS8 integrates real functions of one variable over finite intervals using an adaptive 8-point Legendre-Gauss algorithm. DGAUS8 is intended primarily for high accuracy integration or integration of smooth functions. The maximum number of significant digits obtainable in ANS is the smaller of 18 and the number of digits carried in double precision arithmetic. Description of Arguments Input--* FUN, A, B, ERR are DOUBLE PRECISION * FUN - name of external function to be integrated. This name must be in an EXTERNAL statement in the calling program. FUN must be a DOUBLE PRECISION function of one DOUBLE PRECISION argument. The value of the argument to FUN is the variable of integration which ranges from A to B. A - lower limit of integration B - upper limit of integration (may be less than A) ERR - is a requested pseudorelative error tolerance. Normally pick a value of ABS(ERR) so that DTOL .LT. ABS(ERR) .LE. 1.0D-3 where DTOL is the larger of 1.0D-18 and the double precision unit roundoff D1MACH(4). ANS will normally have no more error than ABS(ERR) times the integral of the absolute value of FUN(X). Usually, smaller values of ERR yield more accuracy and require more function evaluations. A negative value for ERR causes an estimate of the absolute error in ANS to be returned in ERR. Note that ERR must be a variable (not a constant) in this case. Note also that the user must reset the value of ERR before making any more calls that use the variable ERR. Output--* ERR,ANS are double precision * ERR - will be an estimate of the absolute error in ANS if the input value of ERR was negative. (ERR is unchanged if the input value of ERR was non-negative.) The estimated error is solely for information to the user and should not be used as a correction to the computed integral. ANS - computed value of integral IERR- a status code --Normal codes 1 ANS most likely meets requested error tolerance, or A=B. -1 A and B are too nearly equal to allow normal integration. ANS is set to zero. --Abnormal code 2 ANS probably does not meet requested error tolerance.

REFERENCES
(NONE)

ROUTINES CALLED
D1MACH, I1MACH, XERMSG

REVISION HISTORY (YYMMDD)
810223 DATE WRITTEN
890531 Changed all specific intrinsics to generic. (WRB)
890911 Removed unnecessary intrinsics. (WRB)
890911 REVISION DATE from Version 3.2
891214 Prologue converted to Version 4.0 format. (BAB)
900315 CALLs to XERROR changed to CALLs to XERMSG. (THJ)
900326 Removed duplicate information from DESCRIPTION section. (WRB)