Author: mattip <[email protected]>
Branch: numpypy-complex2
Changeset: r57493:d3bdf47a04b2
Date: 2012-09-23 22:06 +0200
http://bitbucket.org/pypy/pypy/changeset/d3bdf47a04b2/
Log: handle case of neg real raised to non-int real in c_pow
diff --git a/pypy/rlib/rcomplex.py b/pypy/rlib/rcomplex.py
--- a/pypy/rlib/rcomplex.py
+++ b/pypy/rlib/rcomplex.py
@@ -67,7 +67,7 @@
def c_pow(x, y):
(r1, i1), (r2, i2) = x, y
- if i1 == 0 and i2 == 0:
+ if i1 == 0 and i2 == 0 and r1>=0:
rr = pow(r1, r2)
ir = 0.
elif r2 == 0.0 and i2 == 0.0:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit