Menu

#2166 "-"(a,b) with simp:false prints incorrectly

closed
nobody
Lisp Core (460)
3
2011-10-01
2011-03-15
No

With simp:true, "-"(a,b) -- internally, ((mminus) a b) -- correctly simplifies to a-b.

But with simp:false, "-"(a,b) prints as -a, not as a-b.

-s

PS There are still some traces of the former n-ary mdifference operator in the code, but it is no longer supported.

Discussion

  • Dieter Kaiser

    Dieter Kaiser - 2011-10-01

    Fixed in grind.lisp revision 1.10.2011 for linear display and displa.lisp revision 1.10.2011 for 2D-display. A function msize-mminus and a function dim-mminus has been added for the display of unsimplified mminus-expressions.

    Examples:

    (%i1) display2d:false$
    (%i2) simp:false$

    (%i3) "-"(a,b,c,d);
    (%o3) a-b-c-d
    (%i4) "-"(a,-b,-c,d);
    (%o4) a+b+c-d

    Closing this bug report as fixed.
    Dieter Kaiser

     
  • Dieter Kaiser

    Dieter Kaiser - 2011-10-01
    • status: open --> closed
     

Log in to post a comment.