pub fn cubic_roots(a: f64, b: f64, c: f64, d: f64) -> Vec<f64>Expand description
Real roots of a x^3 + b x^2 + c x + d.
Depressed cubic plus the trigonometric solution in the three-real-roots case, which avoids the complex arithmetic Cardano’s formula would otherwise need there.