mirror of
https://github.com/python/cpython.git
synced 2025-09-19 15:10:58 +00:00
bpo-42323: Fix math.nextafter() on AIX (GH-24381)
math_nextafter_impl() must return a Python object, not a C double.
This commit is contained in:
parent
62949f697f
commit
0837f99d33
1 changed files with 2 additions and 2 deletions
|
@ -3474,10 +3474,10 @@ math_nextafter_impl(PyObject *module, double x, double y)
|
||||||
return PyFloat_FromDouble(y);
|
return PyFloat_FromDouble(y);
|
||||||
}
|
}
|
||||||
if (Py_IS_NAN(x)) {
|
if (Py_IS_NAN(x)) {
|
||||||
return x;
|
return PyFloat_FromDouble(x);
|
||||||
}
|
}
|
||||||
if (Py_IS_NAN(y)) {
|
if (Py_IS_NAN(y)) {
|
||||||
return y;
|
return PyFloat_FromDouble(y);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return PyFloat_FromDouble(nextafter(x, y));
|
return PyFloat_FromDouble(nextafter(x, y));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue