laplacian_2d
std.seq.laplacian_2d · Level L2The five-point Laplacian (uᵢ₋₁,ⱼ + uᵢ₊₁,ⱼ + uᵢ,ⱼ₋₁ + uᵢ,ⱼ₊₁ − 4uᵢⱼ)/h² at the interior points of a grid of values with spacing h. It equals the exact Laplacian for every polynomial of degree at most 3, so a candidate solution of Poisson's equation can be checked on a grid.
Signature
laplacian_2d(U: f64[m+2, n+2], h: f64[]) → f64[m, n]
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
(U[i−1,j] + U[i+1,j] + U[i,j−1] + U[i,j+1] − 4U[i,j])/h²in exact rational arithmetic, on all 40 test cases. - All 545 float64 results inside the running error bound; the closest uses 92% 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 79% of it.
- correctly rounded (the float64 nearest the exact value)
- 68%
- bit-equal to the NumPy formula in float64
- 93%
- largest error, in units in the last place
- 28
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:e7b5534fa84db8946220eae0a33b804389c37d23f73aced3b521e2817e4d24d0The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.seq.laplacian_2d · Ω:laplacian_2d
- Pins
sha256:7cf87eb00639df03c86e78b3e383f25dd0270f8b619643b2ea39c2e653fe6cf6this graph alone- Evidence
sha256:2bb094aec520e06446c3d239ccb79ab330e72ab59758b64293957eedeacf4d7cthe 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.