check for an object of type infinity - Maple Help

Online Help

All Products    Maple    MapleSim


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

type/infinity - check for an object of type infinity

type/cx_infinity - check for an object of type complex infinity

type/real_infinity - check for an object of type real infinity

type/pos_infinity - check for an object of type positive infinity

type/neg_infinity - check for an object of type negative infinity

type/SymbolicInfinity - check for an object of type symbolic infinity

Calling Sequence

type(x, infinity)

typex,

type(x, cx_infinity)

type(x, real_infinity)

type(x, pos_infinity)

type(x, neg_infinity)

type(x, SymbolicInfinity)

Parameters

x

-

any expression

Description

• 

The type(x, infinity) function returns true if x is one of the following:

  

1.  infinity or -infinity

  

2.  a floating-point number whose exponent is infinity

  

3.  a nonreal, where at least one of the arguments satisfies either (1) or (2)

  

Note: A nonreal is a complex constant which is not of type extended_numeric and where Re(x) (if present) and Im(x) are of type extended_numeric.

• 

You can enter infinity using 1-D or 2-D math, as infinity or .

• 

The type(x, cx_infinity) function returns true if x is a 2-argument nonreal, where each argument is of type infinity.

• 

The type(x, real_infinity) function returns true if x is of type extended_numeric and type infinity.

• 

The type(x, pos_infinity) function returns true if x is a positive real_infinity.

• 

The type(x, neg_infinity) function returns true if x is a negative real_infinity.

• 

The type(x, SymbolicInfinity) function returns true if x is either

  

1.  of type infinity

  

2.  a product with at least one factor of type infinity

• 

A complex extended_numeric object in which one component is of type infinity and the other is of type undefined is considered to be of both types infinity and undefined.  In most computations, however, such an object is considered to be an infinity first, and an undefined second. See the last example below.

Examples

To enter the ` _ ` character in 2-D Math, first press the backslash (\) key, then the character.

typelimx→01x,∞

true

(1)

typelimx→01x,pos_infinity

false

(2)

typelimx→01x,neg_infinity

true

(3)

typeπ,∞

false

(4)

typea∞,∞

false

(5)

typeI∞,∞

true

(6)

typeI∞,cx_infinity

false

(7)

type2+I∞,cx_infinity

false

(8)

type∞+I∞,cx_infinity

true

(9)

typelimx→01x,SymbolicInfinity

true

(10)

typeI∞,SymbolicInfinity

true

(11)

typea∞,SymbolicInfinity

true

(12)

typesignump∞,SymbolicInfinity

true

(13)

typeundefined+2I,undefined

true

(14)

x:=Float∞+undefinedI

x:=Float∞+FloatundefinedI

(15)

x

Float∞

(16)

1x

0.+0.I

(17)

See Also

constant, Im, infinity, Re, type, type/complex, type/extended_numeric, type/negative, type/nonreal, type/positive


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