GAUS8(3)

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

NAME
gaus8 - 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
SINGLE PRECISION (GAUS8-S, DGAUS8-D)

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

AUTHOR
Jones, R. E., (SNLA)

DESCRIPTION
Abstract GAUS8 integrates real functions of one variable over finite intervals using an adaptive 8-point Legendre-Gauss algorithm. GAUS8 is intended primarily for high accuracy integration or integration of smooth functions. Description of Arguments Input-- FUN - name of external function to be integrated. This name must be in an EXTERNAL statement in the calling program. FUN must be a REAL function of one REAL 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 STOL .LT. ABS(ERR) .LE. 1.0E-3 where STOL is the single precision unit roundoff R1MACH(4). ANS will normally have no more error than ABS(ERR) times the integral of the absolute value of FUN(X). Usually, smaller values for 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 - 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
I1MACH, R1MACH, XERMSG

REVISION HISTORY (YYMMDD)
810223 DATE WRITTEN
890531 Changed all specific intrinsics to generic. (WRB)
890531 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)