ema
std.seq.ema · Level L2Exponential moving average of a series, started at its first value: a Scan of ema_step.
s₀ = x₀, sᵢ = α·xᵢ + (1 − α)·sᵢ₋₁
Signature
ema(x: f64[n], alpha: f64[]) → 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
s = x[0]; for each v in x: s = alpha*v + (1 - alpha)*sin exact rational arithmetic, on all 40 test cases. - All 141 float64 results inside the running error bound; the closest uses 52% 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 69% of it.
Accuracy in detail
- correctly rounded (the float64 nearest the exact value)
- 65%
- largest error, in units in the last place
- 6.44
Identity
sha256:811adc4e6cf80740163db191617c6682c1e3635c63fd669b792d1f7f8a7f5114The semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.seq.ema · Ω:ema
- Pins
sha256:e64746bb297736b92321f7f3b91f3057f7aebe8d52912b3250b55357bf673558this graph and the 1 it reaches through calls- Evidence
sha256:4d7ec2b97c8f12f4aca73a9e4c65cd1645407ad6b89953d1cbed32eed94f8903the 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.