How to display (a-b) and not -(b-a)...



On 10/13/06, Patrick Gelin <patrick.gelin at free.fr> wrote:
>
> Hi,
>
> I simplified an expression and maxima show the result as -(b-a). I would
> like to display (a-b).
>

some examples that simplify with ratsimp. powerdisp settings may differ,
but ratsimp works in both cases.

lp

(%i1) powerdisp;
(%o1)                                false
(%i2) factor(b-a);
(%o2)                                b - a
(%i3) factor(a-b);
(%o3)                              - (b - a)
(%i4) ratsimp(%);
(%o4)                                a - b

(%i5) powerdisp:true;
(%o5)                                true
(%i6) factor(b-a);
(%o6)                               - a + b
(%i7) factor(a-b);
(%o7)                             - (- a + b)
(%i8) ratsimp(%);
(%o8)                                a - b