lp_norms
std.linalg.lp_norms · Level L1The ℓ₁ and ℓ∞ norms of a vector: Σ|vᵢ| and max |vᵢ|. Each is a norm on Rⁿ: zero only at 0, absolutely homogeneous, and subadditive (the triangle inequality).
‖v‖₁ = Σ|vᵢ|, ‖v‖∞ = max|vᵢ|
Signature
lp_norms(v: f64[n]) → 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 sum and the maximum of the magnitudesin exact rational arithmetic, on all 40 test cases. - All 80 float64 results inside the running error bound; the closest uses 47% 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 56% of it.
Accuracy in detail
- correctly rounded (the float64 nearest the exact value)
- 94%
- bit-equal to the NumPy formula in float64
- 98%
- largest error, in units in the last place
- 1.00
Identity
Calls
—
Called by
—
sha256:746db1136edf817e7e8cdeb26d8ceeb1a47a1cee8cda65fc8108e285e75aa92aThe semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.linalg.lp_norms · Ω:lp_norms
- Pins
sha256:cbd83ae25310fa7d38276f7a179d9a4421d74c7d883646921d5692267f2c3d1cthis graph alone- Evidence
sha256:9edc48de1718fe6403e336ccb48e44f436ad7cfd9e852c5d6f5cb9ff775dcebcthe 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.