
nterms - the number of terms of a polynomial

Calling sequence:
nterms(poly)
nterms(expr [ , indets ])
indets  ---> [ expr_1 ...]

Parameter:
poly           --  polynomial
expr, expr_1   --  expressions

Overloading:

1

Summary:

nterms returns the number of non-zero terms of a polynomial.  A zero
polynomial has no terms and, therefore, returns 0.

The first argument of nterms is allowed to be a polynomial or an expression
and optionally a listof indeterminates.  An expression is converted into
a polynomial in the specified indeterminates (see function poly).  nterms
returns FAIL if the expression cannot be converted into a polynomial. nterms
is a kernel function.

>>  nterms(x^2*y^2 + x^2 + y + 2, [x,y]);

      4

>>  nterms(x^2*y^2 + x^2 + y + 2, [x]);

      2

>>  nterms(poly(0, [x]));

      0

See also:  coeff , nthcoeff , nthmonomial , nthterm , poly

