FA-91409 / Digital signal filters / Member archive
Running average divides warm-up sums by the full window · case 04
The first W-1 outputs are biased toward zero.
Case contract
Input [W, samples]; causal moving average using a running sum. During warm-up divide by the number of samples seen (min(n+1, W)). Return exact fraction strings; "bad-window" if W < 1.
Why this case matters
Running-sum boxcars are the cheapest smoothing filter; eviction and warm-up slips bias every early or late sample.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: random average 11 | ["-1/5", "2/5", "1"] | ["-1", "1", "5/3"] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗