FA-91479 / Digital signal filters / Member archive
Q15 smoother truncates the product without a rounding offset · case 04
Negative steps settle one LSB short of the input; the filter has a persistent downward bias.
Case contract
Input [alpha, samples]; alpha is Q15 in [0, 32768] ("bad-alpha" otherwise). Inputs are saturated to int16; y += ((x - y) * alpha + 2**14) >> 15 (round half up on the Q15 product via arithmetic shift), starting at y = 0. Return the integer outputs.
Why this case matters
Fixed-point exponential smoothers run on microcontrollers; rounding direction and saturation slips cause bias and limit cycles.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: random smoother 14 | [-9744, -19389, -4824, -15172, -3816, -981, -7994] | [-9743, -19389, -4823, -15171, -3815, -981, -7993] | 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 ↗