From 24a794c7c151f4ccab208a9c48c97657dda646e0 Mon Sep 17 00:00:00 2001 From: Ondrej Certik Date: Wed, 5 Mar 2008 07:04:53 +0100 Subject: [PATCH] A little polishing of the Pow._eval_evalf(). --- sympy/core/power.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sympy/core/power.py b/sympy/core/power.py index 57061f7..b526dad 100644 --- a/sympy/core/power.py +++ b/sympy/core/power.py @@ -399,8 +399,8 @@ class Pow(Basic, ArithMeths, RelMeths): base = base.evalf() exp = exp.evalf() - if exp < 0 and base.has(S.ImaginaryUnit): - base = base.conjugate() / (base * base.conjugate()).evalf().evalf() + if exp < 0 and not base.is_real: + base = base.conjugate() / (base * base.conjugate()).evalf() exp = -exp return (base ** exp).expand() -- 2.11.4.GIT