main
main copied to clipboard
Failing cmath tests
Complex math module should improve precision on certain operations and, in some cases, correctness. Test coverage should also be improved, as single failures appear to hide others.
FAIL: test_specific_values ( ** main ** .CMathTests)
Traceback (most recent call last):
File "test\test_cmath.py", line 349, in test_specific_values
self.rAssertAlmostEqual(expected.real, actual.real,
File "test\test_cmath.py", line 111, in rAssertAlmostEqual
self.fail(msg or
AssertionError: acos0032: acos(complex(-0.99999999999999989, 0.0))
Expected: complex(3.141592638688632, -0.0)
Received: complex(3.141592653589793, -0.0)
Received value insufficiently close to expected value.
Work Item Details
Original CodePlex Issue: Issue 28352 Status: Proposed Reason Closed: Unassigned Assigned to: Unassigned Reported on: Aug 1, 2010 at 3:46 PM Reported by: darb Updated on: Feb 22, 2013 at 2:10 AM Updated by: gwinsky
On 2012-12-22 07:57:46 UTC, HenrySeg commented:
I ran into similar problems with the following script:
import cmath c = (-2.70563e-05+2.71051e-20j) s = cmath.sqrt(c) print c, s, s*s
The output in IronPython: (-2.70563e-05+2.71051e-20j) infj (-inf+nanj)
The output in my OS python implementation: (-2.70563e-05+2.71051e-20j) (2.60547442983e-18+0.00520156707157j) (-2.70563e-05+2.71051e-20j)