## `Type::PolyOf` -- type for testing polynomials

#### Introduction

With `Type::PolyOf`, polynomials can be identified.

#### Call(s)

`testtype(obj,` Type::PolyOf(coeff_type <, num_ind>`)`)

#### Parameters

`obj` | - | any MuPAD object
`coeff_type` | - | the type of the coefficientes; a type can be an object of the library `Type` or one of the possible return values of `domtype` and `type`
`num_ind` | - | the number of indeterminates

#### Returns

see `testtype`

#### Related Functions

`testtype`, `poly`, `indets`

#### Details

- The call `testtype(obj,` Type::PolyOf(coeff_type`)`) checks, whether `obj` is a polynomial with coefficients of type `coeff_type` and, if so, returns `TRUE`, otherwise `FALSE`.

- Only polynomials of type `DOM_POLY` can be identified with `Type::PolyOf`, see `Type::PolyExpr` for polynomial expressions.

- This type expects one or more arguments `Type::PolyOf(`coeff_type <, num_ind>`)`.

  `coeff_type` determines the type of the coefficients.

  The optional argument `num_ind` determines the number of indeterminates. If this argument is not given, the polynomial may have any number of indeterminates.

- This type does not represent a property.

#### Example 1

Is the object a polynomial with integer coefficients?

    >> P := poly(-x^2 - x + 3):
       testtype(P, Type::PolyOf(Type::Integer))

                                       TRUE

Is the object a polynomial with integer coefficients and two indets?

    >> P := poly(-x^2 - x + 3, [x, y]):
       testtype(P, Type::PolyOf(Type::Integer, 2))

                                       TRUE

    >> delete P:

#### Changes

- no changes

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000