Skip to content

Commit 5fa214f

Browse files
committed
ignore errno from atan2 in cmath_polar_impl()
1 parent fde8fc7 commit 5fa214f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/cmathmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,8 +1029,8 @@ cmath_polar_impl(PyObject *module, Py_complex z)
10291029
{
10301030
double r, phi;
10311031

1032-
errno = 0;
10331032
phi = atan2(z.imag, z.real); /* should not cause any exception */
1033+
errno = 0;
10341034
r = _Py_c_abs(z); /* sets errno to ERANGE on overflow */
10351035
if (errno != 0)
10361036
return math_error();

0 commit comments

Comments
 (0)