# log(I**I) #14262

Closed
opened this Issue Feb 18, 2018 · 3 comments

Projects
None yet
3 participants
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

Contributor

### normalhuman commented Feb 18, 2018

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

### sidhantnagpal commented Feb 18, 2018

 Yes, though `log(I**I).evalf()` and `(I**I).is_real` print the correct value.
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

Merged

Merged