FAILURE MAP
← Case archive

FA-91424 / Digital signal filters / Member archive

Centered average accepts an even window · case 04

K = 2 silently produces a three-sample window instead of "bad-window".

Member previewVariant 4 · 3 implementations · 6 checks per implementation

Case contract

Input [K, mode, samples]; K must be odd ("bad-window"). Centered moving average over indices i-K//2..i+K//2 with edge mode "shrink" (average available samples), "zero" (missing samples count as 0, divide by K), "replicate" (clamp index) or "reflect" (mirror without repeating the edge: -1 -> 1, n -> n-2). Return exact fraction strings.

Why this case matters

Offline smoothing needs explicit edge handling; mirror and padding conventions differ between tools and are easy to mix up.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression: even window four["6/5", "2", "2", "9/5"]"bad-window"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 ↗