Name:
degree
gives the degree of a polynomial.
Usage:
degree
(
f
) :
function
->
integer
Parameters:
f
is a function (usually a polynomial).
Description:
If
f
is a polynomial,
degree
(
f
) returns the degree of
f
.
Contrary to the usage, Sollya considers that the degree of the null polynomial is 0.
If
f
is a function that is not a polynomial,
degree
(
f
) returns -1.
Example 1:
> degree((1+x)*(2+5*x^2));
3
> degree(0);
0
Example 2:
> degree(sin(x));
-1
See also:
coeff
,
subpoly
,
roundcoefficients
Go back to the list of commands