type/rational
check for an object of type rational
Calling Sequence
Parameters
Description
Subtypes
Supertypes
Examples
type(x, rational)
x
-
any expression
The type(x, rational) function returns true if x is an integer or fraction. Otherwise, it returns false.
type/fraction, type/integer
type/extended_rational, type/numeric
type⁡1,rational
true
type⁡12,rational
type⁡0.5,rational
false
type⁡Name,rational
type⁡ab,rational
type⁡∞,extended_rational
See Also
convert/rational
infinity
type
type/extended_rational
type/fraction
type/infinity
type/integer
type/numeric
type/undefined
undefined
Download Help Document