> By the way, what are the simplifications that this code does?
(1) simplify each term and flatten: a + (b + c) --> +(a b c),
(2) combine common terms: number + number and number * x + number' * x -->
(number + number') * x,
(3) expunge additive identity: x + 0 --> x and x + 0.0 --> x (but I think
this is a mistake),
(3) one argument simplification (+ x) --> x,
(4) special case dispatch: sum of CRE + expression, list or matrix +
expression, taylorp + expression,
infinity + expression, equality + expression,
(4) sort summands.
In the special case dispatch code, it should be possible to append other
cases (intervals, arrays, ...).
You'll have to slide a few lines into simplus to do this. Also, there is a
"do-over" scheme that
repeats the simplification when (2) produces a result that might require
additional simplification. The
standard simplus also has this do-over scheme. Last I checked (this
morning), the test suite *never*
executes the do-over code!
This code is on my other machine---look for it by Friday afternoon on CVS.
Barton