Expand description
Adaptive numerical integration on bounded intervals, for @integrate
(docs/semantics.md, section 13): the 21-point Gauss–Kronrod rule of
QUADPACK, bisecting the part with the largest error estimate until the
estimate is within the tolerance. An estimate isn’t a bound: a feature
narrower than the rule’s nodes can go unseen, which is why callers give
the places where the integrand has features as breakpoints.
Structs§
- Estimate
- An integral’s value and its error estimate.
- Part
- One part of an integral: its interval and its estimate.
- Table
- An integral over [0, 1], by parts with their running totals, to answer for any interval and to invert.
Constants§
- MAX_
PARTS - The most parts one integral is bisected into.
Functions§
- adaptive
fintegrated over the intervals between consecutivebreaks, by parts bisected where the error is largest until the total error is at mosttolerancetimes the total, andabsolute(the scale below which an error doesn’t matter). The parts, in order, or an error if the tolerance can’t be met, or a value isn’t finite.- integral
fover[a, b], totolerance.- moment
fover[a, b], totolerancerelative to the integral of|f|, so that an integral near zero, like a centred moment’s, converges:Noneif it doesn’t.- not_
converged - rule
- The rule on
[a, b]: the Kronrod estimate, and its difference from the Gauss one as the error. Each evaluation costs a unit of work.