# pretty print incorrect result with powers of sin #7927

Closed
opened this Issue Aug 27, 2014 · 0 comments

Projects
None yet
2 participants
Contributor

### cbm755 commented Aug 27, 2014

 ``````In [38]: x = S('x') In [39]: w = sin(x/2) In [40]: f = w**w In [41]: f Out[41]: sin(x/2)**sin(x/2) In [42]: pprint(f) ⎛x⎞⎛x⎞ sinsin⎜─⎟⎜─⎟ ⎝2⎠⎝2⎠ `````` viz. following which gives a clue what went wrong: ``````In [50]: pprint(w**cos(x)) cos(x)⎛x⎞ sin ⎜─⎟ ⎝2⎠ `````` I wonder if there should be some limit on complexity of `b` in using `(a**b)(x)` instead of `(a(x))**b`. If `b` is "too big" then prefer the latter?

Closed

### cbm755 added a commit to cbm755/sympy that referenced this issue Feb 26, 2015

``` pprint: lift the baseline for Pow in Func**Pow ```
```If Pow has height larger than 1, it will need lifted further.  So
lift its baseline according to its height.  Add tests.

Fixes sympy#7927.```
``` c5e1295 ```

Merged

### mcho421 added a commit to mcho421/sympy that referenced this issue May 4, 2015

``` pprint: lift the baseline for Pow in Func**Pow ```
```If Pow has height larger than 1, it will need lifted further.  So
lift its baseline according to its height.  Add tests.

Fixes sympy#7927.```
``` aac005d ```

### skirpichev added a commit to diofant/diofant that referenced this issue Jul 1, 2015

``` pprint: lift the baseline for Pow in Func**Pow ```
```If Pow has height larger than 1, it will need lifted further.  So
lift its baseline according to its height.  Add tests.

Fixes sympy/sympy#7927.```
``` e087b3e ```

### skirpichev added a commit to diofant/diofant that referenced this issue Jul 3, 2015

``` pprint: lift the baseline for Pow in Func**Pow ```
```If Pow has height larger than 1, it will need lifted further.  So
lift its baseline according to its height.  Add tests.

Fixes sympy/sympy#7927.```
``` 52be6e2 ```

### skirpichev added a commit to diofant/diofant that referenced this issue Jul 3, 2015

``` pprint: lift the baseline for Pow in Func**Pow ```
```If Pow has height larger than 1, it will need lifted further.  So
lift its baseline according to its height.  Add tests.

Fixes sympy/sympy#7927.```
``` 20f0837 ```