FA-91729 / Digital signal filters / Member archive
Goertzel shifts s1 into s2 after overwriting it · case 04
Both states always hold the newest value and the recursion becomes first order.
Case contract
Input [N, k, samples]; samples must have length N ("length-mismatch"). Goertzel recursion s = x + c s1 - s2 with c = 2 cos(2 pi k / N) from zero state; power = s1^2 + s2^2 - c s1 s2, rounded to 6 decimals (equals |X[k]|^2 of the DFT).
Why this case matters
Goertzel filters detect single tones cheaply (DTMF, pilot tones); recursion or coefficient slips misreport bin energy.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: random goertzel 6 | 0.029591 | 11.236712 | 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 ↗