convex_quadratic_on_interval
std.optim.convex_quadratic_on_interval · Level L1Minimizing f(x) = A·x² + B·x + C over a closed interval [lo, hi]: whether f is convex there (A ≥ 0, which makes the problem a convex optimization problem, the interval being convex), as 1 or 0; a minimizer, the vertex −B/(2A) clipped to the interval when A > 0, otherwise the better endpoint (the first, lo, on a tie); and the minimum value. Comparing two feasible points, or one Jensen instance, decides nothing in general; the global answer here comes from the closed form.
Signature
convex_quadratic_on_interval(A: f64[], B: f64[], C: f64[], lo: f64[], hi: f64[]) → f64[], f64[], 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.
- Equal to the reference
the vertex or the endpoints, in exact arithmeticin exact rational arithmetic, on all 40 test cases. - All 120 float64 results are exact: the error is zero.
- Interpreter and NumPy backend return bit-identical results.
- At float32 too: the 40 test cases rounded to float32, and 40 of them exact, with zero error.
- correctly rounded (the float64 nearest the exact value)
- 100%
- bit-equal to the NumPy formula in float64
- 98%
- largest error, in units in the last place
- 0
Identity
sha256:403434335acaa07b721a15d117c5a08f1e6b19ed0fa930230e04c6a5f7a59a3aThe semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.optim.convex_quadratic_on_interval · Ω:convex_quadratic_on_interval
- Pins
sha256:a5c61c1ad711d139a44b82b8d8bb6be5e0feec24d0b93dc43cea9896202e3299this graph alone- Evidence
sha256:5d33d2b6ea2d389dc191d378fa5e735cad919ccd40bf72741b2341a771470102the 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.