Description of problem: >>> from mpmath import * >>> mp.dps = 15; mp.pretty = True >>> nprint(polyroots([1,-1,-14,24], error=True), 4) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/site-packages/mpmath/calculus/polynomials.py", line 201, in polyroots err = max(err, ctx.ldexp(1, -orig+1)) NameError: global name 'orig' is not defined This used to work with python-mpmath-0.18-1 on F20. This is causing a sympy test failure on Rawhide and F20. It looks like an "orig = ctx.prec" statement is missing from that function. Version-Release number of selected component (if applicable): python-mpmath-0.19-1.fc21.noarch How reproducible: Always Steps to Reproduce: 1. Run the python code shown above 2. 3. Actual results: An error. Expected results: ([-4.0, 2.0, 3.0], 2.22e-16) Additional info:
I just reported this in upstream's Google Groups forum. It appears there is a second problem with the polyroots function, leading to lack of convergence on a solution in some cases, so it may be worth waiting for upstream to investigate that issue.
Created attachment 964784 [details] Patch to fix the polyroots function The second bug can be worked around, but this one cannot. Would you please do a build of mpmath with the attached patch applied?
python-mpmath-0.19-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/python-mpmath-0.19-2.fc20
python-mpmath-0.19-2.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/python-mpmath-0.19-2.fc21
python-mpmath-0.19-2.fc21 works
Package python-mpmath-0.19-2.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing python-mpmath-0.19-2.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-16335/python-mpmath-0.19-2.fc20 then log in and leave karma (feedback).
python-mpmath-0.19-2.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.