mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
bpo-39396: Fix math.nextafter(-0.0, +0.0) on AIX 7.1 (GH-18094)
Move also math.nextafter() on math.ulp() tests from IsCloseTests to MathTests.
This commit is contained in:
parent
ec64640a2c
commit
85ead4fc62
3 changed files with 86 additions and 79 deletions
|
|
@ -3287,8 +3287,14 @@ static PyObject *
|
|||
math_nextafter_impl(PyObject *module, double x, double y)
|
||||
/*[clinic end generated code: output=750c8266c1c540ce input=02b2d50cd1d9f9b6]*/
|
||||
{
|
||||
double f = nextafter(x, y);
|
||||
return PyFloat_FromDouble(f);
|
||||
#if defined(_AIX)
|
||||
if (x == y) {
|
||||
/* On AIX 7.1, libm nextafter(-0.0, +0.0) returns -0.0.
|
||||
Bug fixed in bos.adt.libm 7.2.2.0 by APAR IV95512. */
|
||||
return PyFloat_FromDouble(y);
|
||||
}
|
||||
#endif
|
||||
return PyFloat_FromDouble(nextafter(x, y));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue