#950 display2d should use parenthesis for limits

closed
nobody
Lisp Core (472)
5
2006-08-26
2006-06-30
Jaime E. Villate
No

'limit(b*x+a*x+x,x,3);

produces:

limit b x + a x + x
x -> 3

which is misleading. It should better give:

limit ( b x + a x + x )
x -> 3

Discussion

  • Robert Dodier
    Robert Dodier
    2006-06-30

    • labels: --> Lisp Core
     
  • Robert Dodier
    Robert Dodier
    2006-06-30

    Logged In: YES
    user_id=501686

    Jaime, what is the Maxima version?

    I see
    (%i1) display2d:false;
    (%o1) false
    (%i2) 'limit(b*x+a*x+x,x,3);
    (%o2) 'limit(b*x+a*x+x,x,3)

    with 5.9.3 & 5.9.3cvs.

     
  • Robert Dodier
    Robert Dodier
    2006-07-08

    Logged In: YES
    user_id=501686

    OK, I understand now that the question is raised wrt
    display2d : true.

    I don't know that the given display is ambiguous. When limit
    is displayed alone, the parentheses are absent, it is true.
    However, when there are other terms, limit is displayed in
    parentheses. So I am inclined to close this item as "won't fix".

    (%i8) FOO * 'limit(b*x+a*x+x,x,3);
    (%o8) (limit b x + a x + x) FOO
    x -> 3
    (%i9) foo * FOO * 'limit(b*x+a*x+x,x,3);
    (%o9) foo (limit b x + a x + x) FOO
    x -> 3
    (%i10) foo * 'limit(b*x+a*x+x,x,3);
    (%o10) foo (limit b x + a x + x)
    x -> 3

    (%i12) FOO + 'limit(b*x+a*x+x,x,3);
    (%o12) FOO + (limit b x + a x + x)
    x -> 3
    (%i13) foo + FOO + 'limit(b*x+a*x+x,x,3);
    (%o13) FOO + (limit b x + a x + x) + foo
    x -> 3
    (%i14) foo + 'limit(b*x+a*x+x,x,3);
    (%o14) (limit b x + a x + x) + foo
    x -> 3

     
  • Robert Dodier
    Robert Dodier
    2006-08-26

    Logged In: YES
    user_id=501686

    Fixed by r1.24 src/displa.lisp on CVS head (assign right and
    left operator precedence values for %limit the same as for
    %sum).

    (I changed my mind -- it was indeed a bug to omit the
    parentheses.)

     
  • Robert Dodier
    Robert Dodier
    2006-08-26

    • status: open --> closed