triangle_check
std.geometry.triangle_check · Level L3Whether three points A, B, C of the plane (the rows of P) form a non-degenerate triangle, as 1 or 0: they are distinct and not collinear, which is (B − A) × (C − A) ≠ 0; and that cross product, twice the signed area (positive when A, B, C run counterclockwise). Exact for integer coordinates.
Signature
triangle_check(P: f64[3, 2]) → 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 cross product in exact arithmeticin exact rational arithmetic, on all 40 test cases. - All 80 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
- 100%
- largest error, in units in the last place
- 0
Identity
sha256:73130f721b7f6ad497b023800807f32e1db52343c1dca7d3a415d1999693e315The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.geometry.triangle_check · Ω:triangle_check
- Pins
sha256:83a88a3423583c164ac511edb2dd34af90a93e136fd030c0b3619ed4c3b937dcthis graph alone- Evidence
sha256:7b04deda797892bf16f431919827e8500881b7f061050a2431ee61ed0a79e0bathe 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.