imaginary - Maple Help

type/imaginary

check for an object of type imaginary

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

Parameters

 x - any expression d - any numeric type

Description

 • The type(x, imaginary) function returns true if x is a one argument complex constant, where $\mathrm{\Im }\left(x\right)$ is of type extended_numeric.
 • The type(x, imaginary(d)) function returns true if  x is of type imaginary and $\mathrm{\Im }\left(x\right)$ is type d.
 type(x, imaginary(d)) returns false if d is not a numeric type.

Examples

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