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

Bad pretty printing of power of Limit #10803

Closed
asmeurer opened this Issue Mar 11, 2016 · 9 comments

Comments

Projects
None yet
5 participants
@asmeurer
Copy link
Member

asmeurer commented Mar 11, 2016

In [240]: 1/limit(airyai(x)*2*root(x, 4)*exp(2*x**(S(3)/2)/3), x, oo)**2
Out[240]:
                             -2
                3/2
             2⋅x
             ──────
      4 ___    3
lim 2⋅╲╱ x ⋅ℯ      ⋅airyai(x)
x─→∞

The -2 power is just floating there. There needs to be parentheses. Marking as easy to fix because it's probably just an issue of marking the precedence of Limit correctly.

skirpichev added a commit to diofant/diofant that referenced this issue Mar 12, 2016

@parthparashar1647

This comment has been minimized.

Copy link

parthparashar1647 commented Mar 12, 2016

has this been fixed because i ll like to try it

@AnishShah

This comment has been minimized.

Copy link
Contributor

AnishShah commented Mar 12, 2016

No, it's not fixed.
On 12 Mar 2016 11:10 pm, "badcoderparashar" notifications@github.com
wrote:

has this been fixed because i ll like to try it


Reply to this email directly or view it on GitHub
#10803 (comment).

@parthparashar1647

This comment has been minimized.

Copy link

parthparashar1647 commented Mar 14, 2016

can you guide me where to check

so i can make changes there

@parthparashar1647

This comment has been minimized.

Copy link

parthparashar1647 commented Mar 15, 2016

i know what to change can you provide me with the directory you worked with

@asmeurer

This comment has been minimized.

Copy link
Member

asmeurer commented Mar 15, 2016

The pretty printer is in sympy/printing/pretty/

@Imran31

This comment has been minimized.

Copy link
Contributor

Imran31 commented Mar 16, 2016

I would like to work on this, and I want to clarify if you want the parentheses around the entire limit expression.

@asmeurer

This comment has been minimized.

Copy link
Member

asmeurer commented Mar 16, 2016

Yes, there should be parentheses around the whole thing, since it is the whole limit being taken to the -2 power. It should look like this

                               -2
⎛                3/2          ⎞
⎜             2⋅x             ⎟
⎜             ──────          ⎟
⎜      4 ___    3             ⎟
⎜lim 2⋅╲╱ x ⋅ℯ      ⋅airyai(x)⎟
⎝x─→∞                         ⎠

(I did that by hand so hopefully it's correct)

@rd13123013

This comment has been minimized.

Copy link
Contributor

rd13123013 commented Mar 21, 2016

Ping @asmeurer

@asmeurer

This comment has been minimized.

Copy link
Member

asmeurer commented Mar 31, 2016

#10940 fixed this.

@asmeurer asmeurer closed this Mar 31, 2016

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