FAILURE MAP
← Case archive

FA-91404 / Digital signal filters / Member archive

Running average starts evicting one sample late · case 04

The first full window contains W+1 samples summed but divided by W.

Member previewVariant 4 · 3 implementations · 7 checks per implementation

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: random average 15["-3", "3", "5/3", "10/3", "8/3", "5/3"]["-3", "3", "5/3", "13/3", "11/3", "8/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 ↗