gauss_quad
std.func.gauss_quad · Level L3∫ₐᵇ f(t) dt by n-point Gauss–Legendre quadrature, n the length of points: the rule's nodes moved from [−1, 1] to [a, b], (b − a)/2 · Σ wᵢ·f(tᵢ). Exact for polynomials of degree up to 2n − 1. A template over the integrand f, verified through f = silu; a test integrates eᵗ and cos t to 10⁻¹⁵.
Signature
gauss_quad(a: f64[], b: f64[], points: f64[n]) → f64[]
Structure
The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.
- input
- operation
- constant
- call
- output
Verification
- Signature proven by NOVA’s shape solver, for every size.
- Agrees with the reference
witness f = silu: Σ w·silu(t)·(b − a)/2 with the reference ruleto 80 digits (100-digit arithmetic), on all 40 test cases. - All 40 float64 results inside the running error bound; the closest uses 17% of it.
- Interpreter and NumPy backend return bit-identical results.
- At float32 too: the 40 test cases rounded to float32, and 40 of them inside the running error bound at u = 2⁻²⁴; the closest uses 15% of it.
- correctly rounded (the float64 nearest the exact value)
- 18%
- bit-equal to the NumPy formula in float64
- 25%
- largest error, in units in the last place
- 178
Large ulp counts appear where a result is tiny next to the numbers it is computed from (after cancellation, for example), so one unit in the last place is tiny too; the absolute error is still inside the bound. Results within their own error of zero are not counted.
Identity
sha256:454f56b66a3c01e49be808f85702ac7ba139642a0264b8b3007647c5a579e6e4The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.func.gauss_quad[f=std.elementwise.silu]
- Pins
sha256:249b8af6b54bbaf74362386c9d4e34dc3bfd0224d573ce4044bcf79cb02bf639this graph and the 3 it reaches through calls- Evidence
sha256:91dd55ad66aff161207e29cfeb73dd11e445e9a4da8e3274e3293a1d6be0736fthe hash of its verification record- Needs
- no capability: a pure function
Through NOVA’s control layer, the symbol launches this function only while the program still matches what it pins: a change to this graph, or to any graph it reaches, needs a migration first.