Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6634b88

Browse filesBrowse files
committed
Reverted final check in math_1()
1 parent a0c619b commit 6634b88
Copy full SHA for 6634b88

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎Modules/mathmodule.c

Copy file name to clipboardExpand all lines: Modules/mathmodule.c
+2-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.