 type/undefined - Maple Programming Help

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

type/undefined

check for an object of type undefined

 Calling Sequence type(x, undefined)

Parameters

 x - any expression

Description

 • The type(x, undefined) function returns true if x is
 1.  undefined;
 2.  a floating-point number whose exponent is undefined;
 3.  a nonreal, where at least one of the arguments satisfies either (1) or (2).
 A nonreal is a non-extended_numeric complex constant, where $\mathrm{\Re }\left(x\right)$ (if present) and $\mathrm{\Im }\left(x\right)$ are of type extended_numeric.
 • 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 example involving $x$ below.

Examples

 > $\mathrm{type}\left(\mathrm{undefined},\mathrm{undefined}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(I\mathrm{undefined},\mathrm{undefined}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(3\mathrm{undefined},\mathrm{undefined}\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(a\mathrm{undefined},\mathrm{undefined}\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{type}\left(-\mathrm{undefined}+2I,\mathrm{undefined}\right)$
 ${\mathrm{true}}$ (5)
 > x := Float(infinity + undefined*I);
 ${x}{≔}{Float}{}\left({\mathrm{\infty }}\right){+}{Float}{}\left({\mathrm{undefined}}\right){}{I}$ (6)
 > $\mathrm{abs}\left(x\right)$
 ${Float}{}\left({\mathrm{\infty }}\right)$ (7)
 > $\frac{1}{x}$
 ${0.}{}{I}$ (8)
 > $y≔\mathrm{\infty }-\mathrm{\infty }$
 ${y}{≔}{\mathrm{undefined}}$ (9)
 > $\mathrm{type}\left(y,\mathrm{undefined}\wedge \mathrm{extended_rational}\right)$
 ${\mathrm{true}}$ (10)