Skip to content

Commit 325207e

Browse files
Update Objects/complexobject.c
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
1 parent 08cc039 commit 325207e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Objects/complexobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ _Py_c_pow(Py_complex a, Py_complex b)
331331
r.real = len*cos(phase);
332332
r.imag = len*sin(phase);
333333

334-
/* Discard errno set by the math functions above: cos() and sin()
335-
set EDOM for an infinite phase. ERANGE is recovered below. */
334+
/* Don't rely on errno set by the math functions above, for
335+
example cos() and sin() set EDOM for an infinite phase. */
336336
errno = 0;
337337
if (isfinite(a.real) && isfinite(a.imag)
338338
&& isfinite(b.real) && isfinite(b.imag))

0 commit comments

Comments
 (0)