mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-42323: Fix math.nextafter() for NaN on AIX (GH-24265)
This commit is contained in:
parent
7dc71c425c
commit
c1c3493fb7
2 changed files with 7 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
Fix :func:`math.nextafter` for NaN on AIX.
|
||||
|
|
@ -3473,6 +3473,12 @@ math_nextafter_impl(PyObject *module, double x, double y)
|
|||
Bug fixed in bos.adt.libm 7.2.2.0 by APAR IV95512. */
|
||||
return PyFloat_FromDouble(y);
|
||||
}
|
||||
if (Py_IS_NAN(x)) {
|
||||
return x;
|
||||
}
|
||||
if (Py_IS_NAN(y)) {
|
||||
return y;
|
||||
}
|
||||
#endif
|
||||
return PyFloat_FromDouble(nextafter(x, y));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue