|Routine ID: D103|
|Author(s): K.S. Kölbig||Library: MATHLIB|
|Language: Fortran||Revised: 15.03.1993|
Function subprograms GAUSS, DGAUSS and QGAUSS compute, to an attempted specified accuracy, the value of the integral
The quadruple-precision version QGAUSS is available only on computers which support a REAL*16 Fortran data type.
User Entry Names: GAUSS, DGAUSS, QGAUSS
Files Referenced: Unit 6
External References: MTLMTR (N002), ABEND (Z035), user-supplied FUNCTION subprogram
In any arithmetic expression, GAUSS(F,A,B,EPS), DGAUSS(F,A,B,EPS) or QGAUSS(F,A,B,EPS)
has the approximate value of the integral I.
For any interval we define and to be the 8-point and 16-point Gaussian quadrature approximations to
Then, with G = GAUSS or DGAUSS,
where, starting with and finishing with , the subdivision points are given by
with equal to the first member of the sequence for which . If, at any stage in the process of subdivision, the ratio
is so small that is indistinguishable from 1 to machine accuracy, an error exit occurs with the function value set equal to zero.
Unless there is severe cancellation of positive and negative values of over the interval , the argument EPS may be considered as specifying a bound on the relative error of I in the case |I|>1, and a bound on the absolute error in the case |I|<1. More precisely, if k is the number of sub-intervals contributing to the approximation (see Method), and if
then the relation
will nearly always be true, provided the routine terminates without printing an error message. For functions f having no singularities in the closed interval
the accuracy will usually be much higher than this.
Error D103.1: The requested accuracy cannot be obtained (see Method). The function value is set equal to zero, and a message is written on Unit 6 unless subroutine MTLSET (N002) has been called.
Values of the function
at the interval end-points
A and B are not required. The subprogram may therefore
be used when these values are undefined.