Module Quad.Rule
Quadrature rules on [−1, 1].
A rule's tag says which integrals take it: `Formula rules sum their nodes in fixed and cumulative; `Embedded rules also estimate their error.
type -'k tThe type for rules with tags 'k. A rule with more tags can be used as one with fewer, by coercion: (Quad.Rule.kronrod 7 :> [ `Formula ] Quad.Rule.t).
gauss n is the n-point Gauss–Legendre rule, exact for polynomials of degree 2n − 1. Its nodes and weights are computed on the host in float64 by Newton's method on the Legendre polynomial.
Raises Invalid_argument if n < 1.
kronrod n is the (2n + 1)-point Gauss–Kronrod rule that extends gauss n (Piessens et al., QUADPACK, 1983): exact for polynomials of degree 3n + 1, with the n Gauss nodes among its own. n is 7 or 10.
Raises Invalid_argument if n is neither.
nodes r dtype is (x, w), r's nodes in increasing order and their weights, 1-D tensors of dtype: Σ w f(x) approximates ∫₋₁¹ f. A sum in log space is logsumexp (log w + ℓ x).