type/nonreal - Maple Help

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

type/nonreal

check for an object of type nonreal

 Calling Sequence type(x, nonreal) type(x, nonreal(d))

Parameters

 x - expression d - numeric type

Description

 • The type(x, nonreal) function returns true if x is a complex constant which is not of type extended_numeric, such that $\Re \left(x\right)$ (if present) and $\mathrm{\Im }\left(x\right)$ are of type extended_numeric.
 • The type(x, nonreal(d)) function returns true if x is of type nonreal and $\Re \left(x\right)$ (if present) and $\mathrm{\Im }\left(x\right)$ are both of type d. It returns false if d is not a numeric type.

Examples

 > $\mathrm{type}\left(5I,\mathrm{nonreal}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(3,\mathrm{nonreal}\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{type}\left(4.-0.0I,\mathrm{nonreal}\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(x,\mathrm{nonreal}\right)$
 ${\mathrm{false}}$ (4)
 > $\mathrm{type}\left(\frac{1}{2}+3I,\mathrm{nonreal}\left(\mathrm{rational}\right)\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{type}\left(a+Ib,\mathrm{nonreal}\left(\mathrm{name}\right)\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{type}\left(1.+2.I,\mathrm{nonreal}\left(\mathrm{float}\right)\right)$
 ${\mathrm{true}}$ (7)