Skip to content

Commit

Permalink
move check for root of non-real number
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorenz Winkler committed Apr 26, 2024
1 parent 217d260 commit e676709
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions sympy/core/power.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,11 +513,6 @@ def _eval_is_extended_real(self):
return self.exp.is_imaginary
return
real_e = self.exp.is_extended_real
if real_b == False and real_e:
if self.exp == S.Half:
return False
if type(self.exp) == Rational and self.exp.numerator == 1:
return False
if real_e is None:
return
if real_b and real_e:
Expand Down Expand Up @@ -565,6 +560,8 @@ def _eval_is_extended_real(self):
return ok

if real_b is False and real_e: # we already know it's not imag
if isinstance(self.exp, Rational) and self.exp.p == 1:
return False
from sympy.functions.elementary.complexes import arg
i = arg(self.base)*self.exp/S.Pi
if i.is_complex: # finite
Expand Down

0 comments on commit e676709

Please sign in to comment.