 type/infinity - Maple Programming Help

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) $\mathrm{type}\left(x,\mathrm{\infty }\right)$ 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 of the form $a+Ib$, where at least one of a or b satisfies either (1) or (2)
 Note: A nonreal is an expression of the form $a+Ib$, where b <> 0 and a (if present) and b are of type extended_numeric.
 • You can enter infinity using 1-D or 2-D math, as infinity or $\mathrm{\infty }$.
 • The type(x, cx_infinity) function returns true if x is written as y + I*z, where both y and z are 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.

 > $\mathrm{type}\left(\underset{x→{0}^{-}}{lim}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\frac{1}{x},\mathrm{∞}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(\underset{x→{0}^{-}}{lim}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\frac{1}{x},\mathrm{pos_infinity}\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{type}\left(\underset{x→{0}^{-}}{lim}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\frac{1}{x},\mathrm{neg_infinity}\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(\mathrm{Pi},\mathrm{∞}\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{type}\left(a\mathrm{∞},\mathrm{∞}\right)$
 ${\mathrm{false}}$ (5)
 > $\mathrm{type}\left(I\mathrm{∞},\mathrm{∞}\right)$
 ${\mathrm{true}}$ (6)
 > $\mathrm{type}\left(I\mathrm{∞},\mathrm{cx_infinity}\right)$
 ${\mathrm{false}}$ (7)
 > $\mathrm{type}\left(2+I\mathrm{∞},\mathrm{cx_infinity}\right)$
 ${\mathrm{false}}$ (8)
 > $\mathrm{type}\left(-\mathrm{∞}+I\mathrm{∞},\mathrm{cx_infinity}\right)$
 ${\mathrm{true}}$ (9)
 > $\mathrm{type}\left(\underset{x→{0}^{-}}{lim}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}\frac{1}{x},\mathrm{SymbolicInfinity}\right)$
 ${\mathrm{true}}$ (10)
 > $\mathrm{type}\left(I\mathrm{∞},\mathrm{SymbolicInfinity}\right)$
 ${\mathrm{true}}$ (11)
 > $\mathrm{type}\left(a\mathrm{∞},\mathrm{SymbolicInfinity}\right)$
 ${\mathrm{true}}$ (12)
 > $\mathrm{type}\left(\mathrm{signum}\left(p\right)\mathrm{∞},\mathrm{SymbolicInfinity}\right)$
 ${\mathrm{true}}$ (13)
 > $\mathrm{type}\left(-\mathrm{undefined}+2I,\mathrm{undefined}\right)$
 ${\mathrm{true}}$ (14)
 > $x≔\mathrm{Float}\left(\mathrm{∞}+\mathrm{undefined}I\right)$
 ${x}{≔}{Float}{}\left({\mathrm{\infty }}\right){+}{Float}{}\left({\mathrm{undefined}}\right){}{I}$ (15)
 > $\left|x\right|$
 ${Float}{}\left({\mathrm{\infty }}\right)$ (16)
 > $\frac{1}{x}$
 ${0.}{}{I}$ (17)