Package: python-mpmath Version: 0.19-1 Severity: serious Tags: patch How to reproduce: $ python Python 2.7.9 (default, Mar 1 2015, 12:57:24) [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from mpmath import mp >>> mp.polyroots([4,3,2], error=True) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/mpmath/calculus/polynomials.py", line 201, in polyroots err = max(err, ctx.ldexp(1, -orig+1)) NameError: global name 'orig' is not defined
Jeez, this silly glitch renders a significand portion of mpmath unusable! Fix is (stolen from upstream git repository): --- a/usr/lib/python2.7/dist-packages/mpmath/calculus/polynomials.py +++ b/usr/lib/python2.7/dist-packages/mpmath/calculus/polynomials.py @@ -156,6 +156,7 @@ # Constant polynomial with no roots return [] + orig = ctx.prec tol = +ctx.eps with ctx.extraprec(extraprec): deg = len(coeffs) - 1 -richy. -- Richard B. Kreckel <http://in.terlu.de/~kreckel/> -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org