|
Calling Sequence
|
|
degree(o, formal)
tdegree(o, formal)
lcoeff(o, formal)
tcoeff(o, formal)
lterm(o, formal)
tterm(o, formal)
|
|
Parameters
|
|
o
|
-
|
ordinal, nonnegative integer, or polynomial with positive integer coefficients
|
formal
|
-
|
(optional) literal name
|
|
|
|
|
Returns
|
|
•
|
The degree and tdegree commands return the leading and trailing exponents of the ordinal number o, respectively, that is, either an ordinal or a nonnegative integer.
|
•
|
The lcoeff and tcoeff commands return the leading and trailing coefficients of the ordinal number o, respectively, that is, either a nonnegative integer or a polynomial with positive integer coefficients.
|
•
|
The lterm and tterm commands return the leading and trailing terms of the ordinal number o, respectively. The result is returned in form of a list , where the exponent is either an ordinal or a nonnegative integer, and the coefficient is either a nonnegative integer or a polynomial with positive integer coefficients.
|
|
|
Description
|
|
•
|
The degree(o), lcoeff(o), and lterm(o) calling sequences return the leading exponent, coefficient, and term, respectively, of the ordinal number .
|
•
|
The degree (leading exponent) of is the largest exponent in with respect to the ordering of ordinals, and lcoeff and lterm return the coefficient and term, respectively, corresponding to the largest exponent.
|
•
|
The tdegree(o), tcoeff(o), and tterm(o) calling sequences return the trailing exponent, coefficient, and term, respectively, of the ordinal number .
|
•
|
The trailing exponent of is the smallest exponent in with respect to the ordering of ordinals, and tcoeff and tterm return the coefficient and term, respectively, corresponding to the smallest exponent.
|
•
|
lterm is equivalent to [degree,lcoeff] and tterm is equivalent to [tdegree,tcoeff].
|
•
|
If is a nonnegative integer or a polynomial with positive integer coefficients (representing a nonnegative integer), then degree and ldegree both return , and lcoeff and tcoeff both return itself.
|
•
|
If is a parametric ordinal and it cannot be determined whether the leading or trailing coefficient is nonzero, all six commands return an error, unless the option formal is given.
|
•
|
The degree, lcoeff and tcoeff commands overload the corresponding top-level routines degree, lcoeff, and tcoeff, respectively. The top-level commands are still accessible via the :- qualifier, that is, :-degree, :-lcoeff, and :-tcoeff, respectively.
|
•
|
If is a nonconstant polynomial with positive integer coefficients, then the results of degree and :-degree differ: the former returns the leading exponent of as an ordinal, namely , while the latter returns the total degree of as a polynomial, that is, a positive integer. Similarly, the results of lcoeff and :-lcoeff also differ in this case, as do the results of tcoeff and :-tcoeff.
|
|
|
Examples
|
|
| (1) |
>
|
|
| (2) |
>
|
|
>
|
|
lterm and tterm always return a list.
>
|
|
| (5) |
Nonconstant polynomial input.
>
|
|
An error is returned in the parametric case if the proper exponent or coefficient cannot be determined.
>
|
|
| (7) |
| (9) |
| (12) |
|
|
Compatibility
|
|
•
|
The Ordinals[degree], Ordinals[tdegree], Ordinals[lcoeff], Ordinals[tcoeff], Ordinals[lterm] and Ordinals[tterm] commands were introduced in Maple 2015.
|
|
|
|