[New-bugs-announce] [issue42323] [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX
STINNER Victor
report at bugs.python.org
Wed Nov 11 06:34:58 EST 2020
New submission from STINNER Victor <vstinner at python.org>:
https://buildbot.python.org/all/#/builders/302/builds/338
FAIL: test_nextafter (test.test_math.MathTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/aixtools/buildarea/3.9.aixtools-aix-power6/build/Lib/test/test_math.py", line 1968, in test_nextafter
self.assertIsNaN(math.nextafter(NAN, 1.0))
File "/home/aixtools/buildarea/3.9.aixtools-aix-power6/build/Lib/test/test_math.py", line 2015, in assertIsNaN
self.fail("Expected a NaN, got {!r}.".format(value))
AssertionError: Expected a NaN, got 1.0.
The test:
# NaN
self.assertIsNaN(math.nextafter(NAN, 1.0)) # <=== HERE
self.assertIsNaN(math.nextafter(1.0, NAN))
self.assertIsNaN(math.nextafter(NAN, NAN))
The Linux manual page says: "If x or y is a NaN, a NaN is returned."
https://man7.org/linux/man-pages/man3/nextafter.3.html
But it seems like the AIX libc doesn't implement this rule. Should we implement this rule in Python on AIX?
The strange thing is that it worked previously. test.python of build 338:
platform.platform: AIX-2-00F9C1964C00-powerpc-32bit
sysconfig[HOST_GNU_TYPE]: powerpc-ibm-aix7.2.4.0
platform.architecture: 32bit
The latest green build is built 347. test.pythoninfo of build 347:
platform.architecture: 32bit
platform.platform: AIX-2-00F9C1964C00-powerpc-32bit
sysconfig[HOST_GNU_TYPE]: powerpc-ibm-aix7.2.0.0
Was the machine updated two days ago (2020-11-09), between build 338 and build 347?
----------
components: Tests
messages: 380751
nosy: lemburg, mark.dickinson, rhettinger, stutzbach, vstinner
priority: normal
severity: normal
status: open
title: [AIX] test_math: test_nextafter(float('nan'), 1.0) does not return a NaN on AIX
versions: Python 3.10
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42323>
_______________________________________
More information about the New-bugs-announce
mailing list