Function Integrate-Qng

Part of:

package lisplab
( integrate-qng < f > < a > < b > &key (epsabs 0.0d0) (epsrel 1.d-5) )
Compute the integral of f(x) from a to b.

b
/
[
I f(x) dx
]
/
a

f - double precision
function subprogram defining the integrand function
f(x)

a - lower limit of integration

b - upper limit of integration

epsabs - absolute accuracy requested
epsrel - relative accuracy requested
if epsabs.le.0
and epsrel.lt.max(50*rel.mach.acc.,0.5d-28),
the routine will end with ier = 6.

RETURN
result - approximation to the integral i
result is obtained by applying the 21-point
gauss-kronrod rule (res21) obtained by optimal
addition of abscissae to the 10-point gauss rule
(res10), or by applying the 43-point rule (res43)
obtained by optimal addition of abscissae to the
21-point gauss-kronrod rule, or by applying the
87-point rule (res87) obtained by optimal addition
of abscissae to the 43-point rule.

ier - ier = 0 normal and reliable termination of the
routine. it is assumed that the requested
accuracy has been achieved.
ier.gt.0 abnormal termination of the routine. it is
assumed that the requested accuracy has
not been achieved.
abserr - estimate of the modulus of the absolute error,
which should equal or exceed abs(i-result)

neval - number of integrand evaluations

ERROR INDICATIONS
ier = 1 the maximum number of steps has been
executed. the integral is probably too
difficult to be calculated by dqng.
= 6 the input is invalid, because
epsabs.le.0 and
epsrel.lt.max(50*rel.mach.acc.,0.5d-28).
result, abserr and neval are set to zero.