Closed
Description
Bug report
Bug description:
home$ ./python -m test test_math -m test_fma_zero_result
Using random seed: 4191327291
0:00:00 load avg: 0.57 Run 1 test sequentially in a single process
0:00:00 load avg: 0.57 [1/1] test_math
test test_math failed -- Traceback (most recent call last):
File "/home/blue/cpython/Lib/test/test_math.py", line 2773, in test_fma_zero_result
self.assertIsNegativeZero(math.fma(x-y, x+y, -z))
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/blue/cpython/Lib/test/test_math.py", line 2876, in assertIsNegativeZero
self.assertTrue(
~~~~~~~~~~~~~~~^
value == 0 and math.copysign(1, value) < 0,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
msg="Expected a negative zero, got {!r}".format(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
AssertionError: False is not true : Expected a negative zero, got 0.0
test_math failed (1 failure)
== Tests result: FAILURE ==
1 test failed:
test_math
Total duration: 358 ms
Total tests: run=1 (filtered) failures=1
Total test files: run=1/1 (filtered) failed=1
Result: FAILURE
home$
OS: NetBSD 10.0
CPython versions tested on:
CPython main branch
Operating systems tested on:
Other