diff options
Diffstat (limited to 'Cython/Utility/Complex.c')
-rw-r--r-- | Cython/Utility/Complex.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Utility/Complex.c b/Cython/Utility/Complex.c index 28062a061..15d5f544d 100644 --- a/Cython/Utility/Complex.c +++ b/Cython/Utility/Complex.c @@ -265,7 +265,7 @@ static {{type}} __Pyx_PyComplex_As_{{type_name}}(PyObject* o) { if (a.imag == 0) { if (a.real == 0) { return a; - } else if (b.imag == 0) { + } else if ((b.imag == 0) && (a.real >= 0)) { z.real = pow{{m}}(a.real, b.real); z.imag = 0; return z; |