From 16bdffe6216510370a53a42fe5482ff976e5eab6 Mon Sep 17 00:00:00 2001 From: "S.Y. Lee" Date: Fri, 26 Jul 2019 03:44:22 +0900 Subject: [PATCH] Fix doc rendering --- mpmath/calculus/polynomials.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/mpmath/calculus/polynomials.py b/mpmath/calculus/polynomials.py index 24c5d372..ba75c1e8 100644 --- a/mpmath/calculus/polynomials.py +++ b/mpmath/calculus/polynomials.py @@ -100,17 +100,18 @@ def polyroots(ctx, coeffs, maxsteps=50, cleanup=True, extraprec=10, **Precision and conditioning** The roots are computed to the current working precision accuracy. If this - accuracy cannot be achieved in `maxsteps` steps, then a `NoConvergence` - exception is raised. The algorithm internally is using the current working - precision extended by `extraprec`. If `NoConvergence` was raised, that is - caused either by not having enough extra precision to achieve convergence - (in which case increasing `extraprec` should fix the problem) or too low - `maxsteps` (in which case increasing `maxsteps` should fix the problem), or - a combination of both. + accuracy cannot be achieved in ``maxsteps`` steps, then a + ``NoConvergence`` exception is raised. The algorithm internally is using + the current working precision extended by ``extraprec``. If + ``NoConvergence`` was raised, that is caused either by not having enough + extra precision to achieve convergence (in which case increasing + ``extraprec`` should fix the problem) or too low ``maxsteps`` (in which + case increasing ``maxsteps`` should fix the problem), or a combination of + both. - The user should always do a convergence study with regards to `extraprec` - to ensure accurate results. It is possible to get convergence to a wrong - answer with too low `extraprec`. + The user should always do a convergence study with regards to + ``extraprec`` to ensure accurate results. It is possible to get + convergence to a wrong answer with too low ``extraprec``. Provided there are no repeated roots, :func:`~mpmath.polyroots` can typically compute all roots of an arbitrary polynomial to high precision::