poly_derivative
std.seq.poly_derivative · Level L2The derivative of a polynomial, coefficients from the highest degree down as horner takes them: cₖ·(n − 1 − k) for every coefficient but the constant. NumPy's np.polyder.
(Σₖ cₖ·tⁿ⁻¹⁻ᵏ)′ = Σₖ (n − 1 − k)·cₖ·tⁿ⁻²⁻ᵏ
Signature
poly_derivative(c: f64[n]) → f64[n−1]
Requires: n ≥ 2
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 with n ≥ 2.
- Equal to the reference
np.polyder(c)in exact rational arithmetic, on all 40 test cases. - All 143 float64 results inside the running error bound; the closest uses 79% 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 96% of it.
Accuracy in detail
- correctly rounded (the float64 nearest the exact value)
- 100%
- bit-equal to the NumPy formula in float64
- 100%
- largest error, in units in the last place
- 0.50
Identity
Calls
—
Called by
—
sha256:44ccc1065464bcda5a50c6286d145a5a949278c75fc6296c4504a6add148f29dThe semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.seq.poly_derivative · Ω:poly_derivative
- Pins
sha256:bf4e5ad1b19aca25f4d200e589351d242ffc7632037d8fee89e464cd882955dethis graph alone- Evidence
sha256:be5c6e077c7ee4c19a1944cba879995c55818f3b8223a8a86e12f1d440de9581the 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.