poly_cool/
lib.rs

1//! This is a crate for numerical polynomial root-finding.
2//!
3//! Currently, we implement a single solver: Yuksel's iterative algorithm
4//! for finding roots in a bounded interval. We aspire to have
5//! more, with thorough tests and benchmarks.
6
7mod cubic;
8mod poly;
9mod poly_dyn;
10mod quadratic;
11mod yuksel;
12
13#[cfg(any(test, feature = "arbitrary"))]
14pub mod arbitrary;
15
16pub use poly::{Cubic, Poly, Quadratic, Quartic, Quintic};
17pub use poly_dyn::PolyDyn;
18
19fn different_signs(x: f64, y: f64) -> bool {
20    (x < 0.0) != (y < 0.0)
21}