XLPack 7.0
XLPack Numerical Library (C API) Reference Manual
Loading...
Searching...
No Matches

◆ qk41()

void qk41 ( double(*)(double)  f,
double  a,
double  b,
double *  result,
double *  abserr,
double *  resabs,
double *  resasc 
)

Finite interval quadrature (41 point Gauss-Kronrod rule)

Purpose
This routine computes
  I = integral of f over [a, b] with error estimate, and
  J = integral of abs(f) over [a, b],
where f is a given function defined by a user supplied subroutine.
The integral will be evaluated with the 41 point Gauss-Kronrod rule.
Parameters
[in]fThe user supplied subroutine which calculates the integrand function f(x) defined as follows.
double f(double x)
{
return computed f(x) value
}
[in]aLower limit of integration.
[in]bUpper limit of integration.
[out]resultApproximation to I = integral of f over [a, b].
[out]abserrEstimate of the modulus of the absolute error, which should equal or exceed the true error.
[out]resabsApproximation to J = integral of abs(f) over [a, b].
[out]resascApproximation to the integral of abs(f - I/(b - a)) over [a, b].
Reference
SLATEC (QUADPACK)