Each algorithm computes an approximation to a definite integral of the form,
I = \int_a^b f(x) w(x) dx
where w(x) is a weight function (for general integrands w(x)=1). The user provides absolute and relative error bounds (epsabs, epsrel) which specify the following accuracy requirement,
|RESULT - I| <= max(epsabs, epsrel |I|)
where RESULT is the numerical approximation obtained by the algorithm. The algorithms attempt to estimate the absolute error ABSERR = |RESULT - I| in such a way that the following inequality holds,
|RESULT - I| <= ABSERR <= max(epsabs, epsrel |I|)
The routines will fail to converge if the error bounds are too stringent, but always return the best approximation obtained up to that stage.
The algorithms in quadpack use a naming convention based on the following letters,
Q- quadrature routineN- non-adaptive integratorA- adaptive integratorG- general integrand (user-defined)W- weight function with integrandS- singularities can be more readily integratedP- points of special difficulty can be suppliedI- infinite range of integrationO- oscillatory weight function, cos or sinF- Fourier integralC- Cauchy principal value
The algorithms are built on pairs of quadrature rules, a higher order rule and a lower order rule. The higher order rule is used to compute the best approximation to an integral over a small range. The difference between the results of the higher order rule and the lower order rule gives an estimate of the error in the approximation.