Many operations in computer algebra are concerned with polynomials and rational functions. In this section, we review some of the switches and operators available for this purpose. These are in addition to those that work on general expressions (such as DF and INT) described elsewhere. In the case of operators, the arguments are first simplified before the operations are applied. In addition, they operate only on arguments of prescribed types, and produce a type mismatch error if given arguments which cannot be interpreted in the required mode with the current switch settings. For example, if an argument is required to be a kernel and a/2 is used (with no other rules for A), an error
With the exception of those that select various parts of a polynomial or rational function, these operations have potentially significant effects on the space and time associated with a given calculation. The user should therefore experiment with their use in a given calculation in order to determine the optimum set for a given problem.
One such operation provided by the system is an operator LENGTH which returns the number of top level terms in the numerator of its argument. For example,
has the value 10. To get the number of terms in the denominator, one would first select the denominator by the operator DEN and then call LENGTH, as in
Other operations currently supported, the relevant switches and operators, and the required argument and value modes of the latter, follow.