Skip to content

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

@furkanonder

Description

@furkanonder

Bug report

Bug description:

home$ ./python -m test test_math -m test_fma_zero_result
Usingrandomseed: 41913272910:00:00loadavg: 0.57Run1testsequentiallyinasingleprocess0:00:00loadavg: 0.57 [1/1] test_mathtesttest_mathfailed--Traceback (mostrecentcalllast): File"/home/blue/cpython/Lib/test/test_math.py", line2773, intest_fma_zero_resultself.assertIsNegativeZero(math.fma(x-y, x+y, -z)) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^File"/home/blue/cpython/Lib/test/test_math.py", line2876, inassertIsNegativeZeroself.assertTrue( ~~~~~~~~~~~~~~~^value==0andmath.copysign(1, value) <0, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^msg="Expected a negative zero, got{!r}".format(value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^AssertionError: Falseisnottrue : Expectedanegativezero, got0.0test_mathfailed (1failure) ==Testsresult: FAILURE==1testfailed: test_mathTotalduration: 358msTotaltests: run=1 (filtered) failures=1Totaltestfiles: run=1/1 (filtered) failed=1Result: FAILUREhome$

OS: NetBSD 10.0

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixesOS-netbsdtestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions