8000 gh-104263: Rely on Py_NAN and introduce Py_INFINITY by seberg · Pull Request #104202 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
8000

gh-104263: Rely on Py_NAN and introduce Py_INFINITY #104202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
May 10, 2023
Prev Previous commit
Next Next commit
And another Py_HUGE_VAL -> Py_INFINITY replacement
  • Loading branch information
mdickinson committed May 8, 2023
commit 18a05cb19c3d5ffa64cae2c6425fb128c3cea230
2 changes: 1 addition & 1 deletion Modules/mathmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3909,7 +3909,7 @@ math_ulp_impl(PyObject *module, double x)
if (Py_IS_INFINITY(x)) {
return x;
}
double inf = Py_HUGE_VAL;
double inf = Py_INFINITY;
double x2 = nextafter(x, inf);
if (Py_IS_INFINITY(x2)) {
/* special case: x is the largest positive representable float */
Expand Down
0