
degree - degree of a polynomial

Calling sequence:

degree(poly [ , expr_2 ])
degree(expr [ , indets ]  [ , expr_2 ])
indets  ---> [ expr_1 ...]

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

Overloading:

1

Summary:

degree(p) calculates the total degree of the polynomial p. The degree of a
zero polynomial is defined as 0.  degree(p,x) calculates the degree of the
polynomial p with respect to the variable x.

The first argument of degree 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).  degree
returns FAIL if the expression cannot be converted into a polynomial. degree
is a kernel function.

>>  degree(x^3+x^2*y^2+2);

      4

>>  p := poly(x^2*z+x*z^3+1, [x,z]): degree(p);

      4

>>  degree(x^2*z+x*z^3+1, [x,z], z);

      3

>>  degree(0, [x,y]);

      0

See also:  degreevec , ldegree , poly

