Consider:
(%i1) -((a+b)/x);
(%o1) -(b+a)/x
(%i2) ?print(%)$
((MTIMES SIMP) -1 ((MPLUS SIMP) $A $B) ((MEXPT SIMP) $X -1))
(%i3) -(a+b)/x;
(%o3) (-b-a)/x
(%i4) ?print(%)$
((MTIMES SIMP)
((MPLUS SIMP) ((MTIMES SIMP) -1 $A) ((MTIMES SIMP) -1 $B))
((MEXPT SIMP) $X -1))
Is there a switch that makes (%i1) and (%i3) simplify to
the same internal representation (so that alike1 says
that they are the same)? I thought negdistrib did this,
but it doesn't.
I'm trying to simplify the logic in our test suite (it's a mess!).
I keep running into trouble with equality of expressions
similar to -((a+b)/x) and -(a+b)/x. Our test suite uses ratsimp
to test for equality; thus the test
factor(x^2-1);
(x+1)*(x-1)$
doesn't really test the factor function. Yikes.
Barton