Function rgsl::polynomials::cubic_equations::poly_complex_solve_cubic [] [src]

pub fn poly_complex_solve_cubic(
    a: f64,
    b: f64,
    c: f64,
    z0: &mut ComplexF64,
    z1: &mut ComplexF64,
    z2: &mut ComplexF64
) -> i32

This function finds the complex roots of the cubic equation,

z3 + a z2 + b z + c = 0

The number of complex roots is returned (always three) and the locations of the roots are stored in z0, z1 and z2. The roots are returned in ascending order, sorted first by their real components and then by their imaginary components.