type/rational - check for an object of type rational
type/extended_rational - check for an object of type extended_rational
|
Calling Sequence
|
|
type(x, rational)
type(x, extended_rational)
|
|
Description
|
|
•
|
The type(x, rational) function returns true if x is an integer or fraction. Otherwise, it returns false.
|
•
|
The type(x, extended_rational) function returns true if x is a rational, infinity, -infinity, or undefined. Equivalently, x is of type extended_rational if it is of type extended_numeric and not of type float.
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
|
|
Download Help Document
Was this information helpful?