Package: mpmath / 0.19-3

93b3e5ed85feeafcfeb36f3d90524c57871daba3.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From 93b3e5ed85feeafcfeb36f3d90524c57871daba3 Mon Sep 17 00:00:00 2001
From: Fredrik Johansson <fredrik.johansson@gmail.com>
Date: Thu, 7 Aug 2014 21:25:21 +0200
Subject: [PATCH] fix polyroots with error=True

---
 mpmath/calculus/polynomials.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mpmath/calculus/polynomials.py b/mpmath/calculus/polynomials.py
index 1b2ac03..39373ff 100644
--- a/mpmath/calculus/polynomials.py
+++ b/mpmath/calculus/polynomials.py
@@ -156,6 +156,7 @@ def polyroots(ctx, coeffs, maxsteps=50, cleanup=True, extraprec=10,
         # Constant polynomial with no roots
         return []
 
+    orig = ctx.prec
     tol = +ctx.eps
     with ctx.extraprec(extraprec):
         deg = len(coeffs) - 1