pub fn halley<T: RealScalar>(
poly: &Poly<T>,
epsilon: T,
max_iter: Option<usize>,
initial_guess: Option<Complex<T>>,
) -> Result<(Vec<Complex<T>>, u128), Error<Vec<Complex<T>>>>Expand description
Find a single root
§Returns
- vector of roots (usually 1)
- number of evaluations
§Errors
NoConverge: the root finder did not converge within the given constraints. The best guess so far is returned with the error.\n
§Panics
If T is any primitive type, this function does not panic. However, if T does not implement num::FromPrimitive::from_f64 correctly, this function might panic under certain circumstances (casting of extreme values, usually)\n\n
If T is f32 or f64, this function does not panic. However, if T cannot represent all primitive integers smaller than usize::MAX, this might panic under certain circumstances (casting of extreme values, usually)\n\n