type/rational - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/rational

type/rational

check for an object of type rational

type/extended_rational

check for an object of type extended_rational

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

type(x, rational)

type(x, extended_rational)

Parameters

x

-

any expression

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

type1,rational

true

(1)

type12,rational

true

(2)

type0.5,rational

false

(3)

typeName,rational

false

(4)

typeab,rational

false

(5)

type∞,extended_rational

true

(6)

See Also

convert/rational

infinity

type

type/fraction

type/infinity

type/integer

type/numeric

type/undefined

undefined

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam