There was an error while loading. Please reload this page.
1 parent 08cc039 commit 325207eCopy full SHA for 325207e
1 file changed
Objects/complexobject.c
@@ -331,8 +331,8 @@ _Py_c_pow(Py_complex a, Py_complex b)
331
r.real = len*cos(phase);
332
r.imag = len*sin(phase);
333
334
- /* Discard errno set by the math functions above: cos() and sin()
335
- set EDOM for an infinite phase. ERANGE is recovered below. */
+ /* Don't rely on errno set by the math functions above, for
+ example cos() and sin() set EDOM for an infinite phase. */
336
errno = 0;
337
if (isfinite(a.real) && isfinite(a.imag)
338
&& isfinite(b.real) && isfinite(b.imag))
0 commit comments