[][src]Function roots::find_roots_eigen

pub fn find_roots_eigen(c: Vec<f64>) -> VecDeque<f64>

Find all roots of the normalized polynomial by finding eigen numbers of the corresponding matrix. (Converted from Java by stiv-yakovenko)

Note that found roots are approximate and not sorted.

Examples

use roots::find_roots_eigen;

let roots = find_roots_eigen(vec!(0f64, -1f64, 0f64));
// Returns [0f64, 0.9999999999999999f64, -0.9999999999999999f64] while 'x^3 - x = 0' has roots -1, 0, and 1