type/nonreal - Maple Programming 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 of the form $a+Ib$, where b <> 0 and a (if present) and b are of type extended_numeric.
 • The type(x, nonreal(d)) function returns true if d is a numeric type, and x is of the form $a+Ib$, where b <> 0 and a (if present) and b are of type d.

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.I,\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)