We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5d5b7d7 + fb1437f commit da03c32Copy full SHA for da03c32
sympy/functions/elementary/complexes.py
@@ -343,13 +343,16 @@ def eval(cls, arg):
343
elif a.is_extended_positive:
344
pass
345
else:
346
- ai = im(a)
347
- if a.is_imaginary and ai.is_comparable: # i.e. a = I*real
348
- s *= S.ImaginaryUnit
349
- if ai.is_extended_negative:
350
- # can't use sign(ai) here since ai might not be
351
- # a Number
352
- s = -s
+ if a.is_imaginary:
+ ai = im(a)
+ if ai.is_comparable: # i.e. a = I*real
+ s *= S.ImaginaryUnit
+ if ai.is_extended_negative:
+ # can't use sign(ai) here since ai might not be
+ # a Number
353
+ s = -s
354
+ else:
355
+ unk.append(a)
356
357
unk.append(a)
358
if c is S.One and len(unk) == len(args):
0 commit comments