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

◆ qk15_r()

void qk15_r ( double  a,
double  b,
double *  result,
double *  abserr,
double *  resabs,
double *  resasc,
double *  xx,
double  yy,
int *  irev 
)

Finite interval quadrature (15 point Gauss-Kronrod rule) (reverse communication version)

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. User should provide the necessary computed values of f according to the argument irev.
The integral will be evaluated with the 15 point Gauss-Kronrod rule.
Parameters
[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].
[out]xxirev = 1 to 5: xx contains the abscissa where the function value should be evaluated and given in the next call.
[in]yyirev = 1 to 5: The function value f(xx) should be given in yy in the next call.
[in,out]irevControl variable for reverse communication.
[in] Before first call, irev should be initialized to zero. On succeeding calls, irev should not be altered.
[out] If irev is not zero, complete the following tasks and call this routine again without changing irev.
= 0: Computation finished.
= 1 to 5: User should set the function value at xx in yy. Do not alter any variables other than yy.
Reference
SLATEC (QUADPACK)