type/polynom - check for a polynomial
|
Calling Sequence
|
|
type(a, polynom)
type(a, polynom(d))
type(a, polynom(d, v))
|
|
Parameters
|
|
a
|
-
|
any expression
|
d
|
-
|
(optional) type name for the coefficient domain
|
v
|
-
|
(optional) variable(s)
|
|
|
|
|
Description
|
|
•
|
The call type(a, polynom(d, v)) checks to see if a is a polynomial in the variables v with coefficients in the domain d. A typical calling sequence would be
|
|
which tests to see if a is a polynomial in x over the integers.
|
•
|
The variable(s) v can be a single indeterminate, or can be a list or set of indeterminates. In the latter case, one would be testing for a multivariate polynomial.
|
•
|
If v is omitted, then it is taken to be a set of all the indeterminates of type name appearing in a. Thus the function will check that a is a polynomial in all of its variables.
|
•
|
The domain specification d should be a type name, such as rational or algnum (algebraic number). If the domain specification is given as anything then no restriction is placed on the coefficients. If d is omitted, then it defaults to type constant.
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
|
|
Download Help Document
Was this information helpful?