ipow_step
std.elementwise.ipow_step · Level L4One step of binary exponentiation on floats: if k is odd, multiply the result by the base; square the base; halve k. The body ipow runs.
acc ← acc·base if k odd; base ← base²; k ← ⌊k/2⌋
Signature
ipow_step(base: f64[n], k: i64[n], acc: f64[n]) → f64[n], i64[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.
- Equal to the reference
acc*base if k odd; base*base; k // 2in exact rational arithmetic, on all 40 test cases. - All 405 float64 results inside the running error bound; the closest uses 82% 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 78% of it.
Accuracy in detail
- 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.50
Identity
sha256:fe04c637e77949a67aadd4348a53167025bfe2ae43677efe381acbfb45acfd9bThe semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.elementwise.ipow_step · Ω:ipow_step
- Pins
sha256:6d82a8c5f5b4814eacf060fb2de3103c02ac1fcc40c9758ebe4becf51c7dbc9cthis graph alone- Evidence
sha256:4a13e087d5a1410114faf67f3fd7e548ab8323f8e4aebdb64f9643b87b160859the 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.