Skip to content

test_fma_zero_result fails due to unexpected zero instead of negative zero on NetBSD #125150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
furkanonder opened this issue Oct 8, 2024 · 1 comment
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes OS-netbsd tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@furkanonder
Copy link
Contributor

furkanonder commented Oct 8, 2024

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

Linked PRs

@furkanonder furkanonder added type-bug An unexpected behavior, bug, or error tests Tests in the Lib/test dir 3.13 bugs and security fixes 3.14 bugs and security fixes labels Oct 8, 2024
@skirpichev
Copy link
Member

Does exists an upstream issue for that?

vstinner pushed a commit that referenced this issue Oct 9, 2024
…plementation issues (#125151)

Skip test_fma_zero_result on NetBSD due to IEE 754-2008 implementation issues
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Oct 9, 2024
…008 implementation issues (pythonGH-125151)

Skip test_fma_zero_result on NetBSD due to IEE 754-2008 implementation issues
(cherry picked from commit 92760bd)

Co-authored-by: Furkan Onder <[email protected]>
@vstinner vstinner closed this as completed Oct 9, 2024
vstinner pushed a commit that referenced this issue Oct 9, 2024
…2008 implementation issues (GH-125151) (#125173)

gh-125150: Skip test_fma_zero_result on NetBSD due to IEE 754-2008 implementation issues (GH-125151)

Skip test_fma_zero_result on NetBSD due to IEE 754-2008 implementation issues
(cherry picked from commit 92760bd)

Co-authored-by: Furkan Onder <[email protected]>
efimov-mikhail pushed a commit to efimov-mikhail/cpython that referenced this issue Oct 9, 2024
…008 implementation issues (python#125151)

Skip test_fma_zero_result on NetBSD due to IEE 754-2008 implementation issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes OS-netbsd tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants