det
std.linalg.det · Level L3The determinant of a square matrix, by Gaussian elimination with partial pivoting: the product of the pivots, with a sign for each row swap. A Scan of lu_det_step over the columns, carrying the matrix and the determinant so far. The reference is Bareiss's fraction-free elimination, in exact arithmetic.
Signature
det(A: f64[n, 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.
- Equal to the reference
np.linalg.det(A); exactly: Bareiss eliminationin exact rational arithmetic, on all 40 test cases. - All 40 float64 results inside the running error bound; the closest uses 22% of it.
- Interpreter and NumPy backend return bit-identical results.
- At float32 too: the 40 test cases rounded to float32, and 38 of them inside the running error bound at u = 2⁻²⁴; the closest uses 32% of it. Outside float32’s range: 2.
- correctly rounded (the float64 nearest the exact value)
- 60%
- bit-equal to the NumPy formula in float64
- 18%
- largest error, in units in the last place
- 3.49
Note
When the elimination meets a pivot that is exactly zero, the determinant is exactly 0, and that step divides by 1 instead; the zero matrix gives 0, not NaN. When rounding leaves a tiny pivot instead of zero, the result is tiny, as in LAPACK. Verification uses non-singular matrices whose rows are shuffled, so the pivoting swaps rows: near a singular matrix, whether a pivot is zero cannot be certain.
Identity
sha256:d50357cf04fd4e96afb188e29f27d1c5cb9a19dbd9fd12b1dbbc3d3d64ae0d8aThe semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.linalg.det · Ω:det
- Pins
sha256:a2e3dedcfb4d9846cb869b98ece898973e687700c739ae1c71c64f94dc44cc4fthis graph and the 1 it reaches through calls- Evidence
sha256:0afff3631b298c6b8748543dc68008c915bde44ed38918bbc45aba4712a731ffthe 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.