complex_abs
std.elementwise.complex_abs · Level L2The modulus |z| = √(a² + b²) of each element of a complex vector stored as a [2, n] array of real and imaginary parts.
|a + bi| = √(a² + b²)
Signature
complex_abs(z: f64[2, n]) → f64[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.
- Agrees with the reference
np.abs(z[0] + 1j*z[1])to 80 digits (100-digit arithmetic), on all 40 test cases. - All 171 float64 results inside the running error bound; the closest uses 79% 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 75% of it.
Accuracy in detail
- correctly rounded (the float64 nearest the exact value)
- 90%
- bit-equal to the NumPy formula in float64
- 100%
- largest error, in units in the last place
- 1.01
Identity
Calls
—
Called by
—
sha256:efd03c5c63d93c3617df2821c71cde1efd5f9217df3d5d70488ee0f659964f28The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.elementwise.complex_abs · Ω:complex_abs
- Pins
sha256:a457f5c84c025d7b51bf83bc0cd95533ee5a7d9f6eddc55502ae021a5730115athis graph alone- Evidence
sha256:795903f877082060f81726ac4cbc363ecd7043a0485b9114ae286473a9683db0the 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.