8000 Reverted final check in math_1() · python/cpython@6634b88 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6634b88

Browse files
committed
Reverted final check in math_1()
1 parent a0c619b commit 6634b88

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Modules/mathmodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,8 @@ math_1(PyObject *arg, double (*func) (double), int can_overflow)
970970
else
971971
errno = EDOM;
972972
}
973-
if (errno && is_error(r))
973+
if (Py_IS_FINITE(r) && errno && is_error(r))
974+
/* this branch unnecessary on most platforms */
974975
return NULL;
975976
return PyFloat_FromDouble(r);
976977
}

0 commit comments

Comments
 (0)
0