1 // Condense an expression by factoring common terms.
32 if (car(p1
) != symbol(ADD
)) {
37 // get gcd of all terms
48 // divide each term by gcd
62 // We multiplied above w/o expanding so sum factors cancelled.
64 // Now we expand which which normalizes the result and, in some cases,
65 // simplifies it too (see test case H).
69 // multiply result by gcd