Skip to content

Commit

Permalink
touch up docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ickk committed Sep 19, 2023
1 parent 63c1bc4 commit d216e93
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ use num_traits::{

/// Find all of the roots of a polynomial using Aberth's method
///
/// Polynomial of the form `f(x) = a + b*x + c*x^2 + d*x^3 + ...`.
/// Polynomial of the form `f(x) = a + b*x + c*x^2 + d*x^3 + ...`
///
/// `polynomial` is a slice containing the coefficients `[a, b, c, d, ...]`.
/// `polynomial` is a slice containing the coefficients `[a, b, c, d, ...]`
///
/// When two successive iterations produce roots with less than `epsilon`
/// delta, the roots are returned.
Expand Down Expand Up @@ -176,7 +176,8 @@ mod feature_std {
/// use aberth::{AberthSolver, Complex};
///
/// let mut solver = AberthSolver::new();
/// let roots_a: Vec<Complex<f32>> = solver.find_roots(&[-1., 2., 0., 4., 11.]).to_vec();
/// let roots_a: Vec<Complex<f32>> =
/// solver.find_roots(&[-1., 2., 0., 4., 11.]).to_vec();
/// let roots_b = solver.find_roots(&[-28., 39., -12., 1.]);
/// roots_a[0];
/// ```
Expand Down Expand Up @@ -211,9 +212,9 @@ mod feature_std {

/// Find all the complex roots of the polynomial
///
/// Polynomial is given in the form `f(x) = a + b*x + c*x^2 + d*x^3 + ...`.
/// Polynomial is given in the form `f(x) = a + b*x + c*x^2 + d*x^3 + ...`
///
/// `polynomial` is a slice containing the coefficients `[a, b, c, d, ...]`.
/// `polynomial` is a slice containing the coefficients `[a, b, c, d, ...]`
pub fn find_roots<C: ComplexCoefficient<F>>(
&mut self,
polynomial: &[C],
Expand Down

0 comments on commit d216e93

Please sign in to comment.