New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log(I**I) #14262

Closed
sidhantnagpal opened this Issue Feb 18, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@sidhantnagpal
Member

sidhantnagpal commented Feb 18, 2018

>> pprint(simplify(log(I**I)))
   ⎛ ⅈ⎞
log⎝ⅈ ⎠

>> pprint(simplify(log(I**I)).expand(complex=True))
               ⎛ ⅈ⎞      ⎛│ ⅈ│⎞      
- ⅈ⋅π⋅Heaviside⎝ⅈ ⎠ + log⎝│ⅈ │⎠ + ⅈ⋅π

Expected Result

 -π 
 ───
  2  

Related Issues

#7569 - simplify should call expand_complex
#13288 - Improve simplification

@normalhuman

This comment has been minimized.

Contributor

normalhuman commented Feb 18, 2018

I also expected (I**I).rewrite(exp) to return exp(-pi/2).

@sidhantnagpal

This comment has been minimized.

Member

sidhantnagpal commented Feb 18, 2018

Yes, though log(I**I).evalf() and (I**I).is_real print the correct value.

@abaokar-07

This comment has been minimized.

Contributor

abaokar-07 commented Feb 19, 2018

@normalhuman I think we have to add that if the argument of log is complex and has powers, then return the expected value
for example
>>> simplify(log(I**I)).expand(complex=True)
-pi/2
>>> simplify(log(I**(3*I))).expand(complex=True)
-3*pi/2
i.e. , depending on the coefficient of the I which is present in the power

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment