complexcons - Maple Help

Online Help

All Products    Maple    MapleSim

type/complexcons

check for a complex constant

 Calling Sequence type(x, complexcons)

Parameters

 x - any expression

Description

 • The call type(x, complexcons) checks if x is a complex constant. A complex constant is either of type infinity, or an expression (with no indeterminates of type name) for which evalf returns a number of the form $a+Ib$ where a and b are floating-point numbers.

Examples

 > $\mathrm{type}\left(4,\mathrm{complexcons}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(2+I,\mathrm{complexcons}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{type}\left(3.5,\mathrm{complexcons}\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(\mathrm{ln}\left(\mathrm{\pi }+I\right),\mathrm{complexcons}\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{type}\left(\mathrm{\infty },\mathrm{complexcons}\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{type}\left(g\left(2\right),\mathrm{complexcons}\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{type}\left(\mathrm{FAIL},\mathrm{complexcons}\right)$
 ${\mathrm{false}}$ (7)
 > $\mathrm{type}\left({x}^{2},\mathrm{complexcons}\right)$
 ${\mathrm{false}}$ (8)

 See Also