Skip to content

Reject unstable direct biquad coefficients - #345

Open
be-student wants to merge 1 commit into
kmolan:mainfrom
be-student:codex/285-guard-biquad-stability
Open

Reject unstable direct biquad coefficients#345
be-student wants to merge 1 commit into
kmolan:mainfrom
be-student:codex/285-guard-biquad-stability

Conversation

@be-student

Copy link
Copy Markdown

What & why

Fixes #285 by rejecting directly supplied feedback weights unless their poles are strictly inside the unit circle. This preserves the invariant that every accepted BiquadCoefficients value is stable, so Biquad::settle_to cannot divide by a zero steady-state denominator and seed non-finite state.

Tests cover the reported zero-divisor pair, other unstable boundary cases, and unchanged settling for designed low-pass and notch filters. The changelog and public API documentation describe the new validation. This contribution was implemented with AI assistance and reviewed through the repository's test and lint gates.

Checklist

  • cargo test + cargo clippy --all-targets clean locally
  • New public APIs have a doc example (no new public API)
  • No unwrap/expect/panic on library paths (typed errors instead)

@be-student
be-student requested a review from kmolan as a code owner September 6, 2026 09:48

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the first PR! 🎉 You'll get a first review within 48 h. CI runs the 5-target matrix — a budget-gate failure isn't your fault, see ci/README.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Guard the steady-state divisor in Biquad::settle_to

1 participant