REDUCE

9.1 Controlling the Expansion of Expressions

The switch exp controls the expansion of expressions. If it is off, no expansion of powers or products of expressions occurs. Users should note however that in this case results come out in a normal but not necessarily canonical form. This means that zero expressions simplify to zero, but that two equivalent expressions need not necessarily simplify to the same form.

Example: With exp on, the two expressions

        (a+b)*(a+2*b)

and

        a^2+3*a*b+2*b^2

will both simplify to the latter form. With exp off, they would remain unchanged, unless the complete factoring (allfac) option were in force. exp is normally on.

Several operators that expect a polynomial as an argument behave differently when exp is off, since there is often only one term at the top level. For example, with exp off

        length((a+b+c)^3/(c+d));

returns the value 1.


Hosted by Download REDUCE Powered by MathJax