Repository navigation
feat(root_finding): add Brent bracketed scalar root finder - #323
Conversation
|
@snowyukitty you're failing pipelines. Run |
|
Done — I ran |
|
Brent is not re-exported from the crate root. |
|
|
||
| /// Evaluates inverse quadratic interpolation (IQI) through three points `(a, fa)`, `(b, fb)`, `(c, fc)`. | ||
| #[inline] | ||
| pub fn inverse_quadratic_interpolation<T: Numeric>(a: T, fa: T, b: T, fb: T, c: T, fc: T) -> T { |
There was a problem hiding this comment.
why is this public? I don't know if external users will want to access this. Lets keep it pub(crate) so its internal only and we can still test it.
Also it is missing the #[must_use] attribute
|
Done in 35c4521 — Brent is now re-exported from the crate root, the IQI helper is pub(crate) with #[must_use] and in-module coverage, and I added the required Unreleased changelog entry. The full local test, clippy, and docs checks are green. |
|
@snowyukitty thanks! Looking forward to more contributions 🚀 |
Description
Adds a bracketed scalar root finder using Brent's method (the Dekker-Brent algorithm) in
crates/multicalc/src/root_finding/brent.rs.Implementation Details
RootReportandRootTerminationstructures.crates/multicalc/tests/suite/root_finding.rscomparing againstBisectionfixtures (asserting equal root precision with strictly fewer iterations), invalid brackets, non-finite values, and budget exhaustion.Testing
cargo test -p multicalcCloses #216