Skip to main content

newton_method

Function newton_method 

Source
pub fn newton_method<F, Df>(
    f: F,
    df: Df,
    z0: Complex,
    max_iter: usize,
    tol: f64,
) -> Option<Complex>
where F: Fn(Complex) -> Complex, Df: Fn(Complex) -> Complex,
Expand description

Newton’s method for finding a root of f (with derivative df), starting at z0. Returns Some(root) if converged within max_iter iterations to within tol.