Tests if the data type of
X is considered a complex type.
Xis any object
true iff the data type of
X is considered a complex data type. These include
complex vectors, and
real vectors, and
X can be of a complex type even if its imaginary part is zero. For example, a complex matrix may just happen to contain entries that all have zero imaginary parts.
Most often, you want to use the
IsComplex function instead. This tests for “mathematical complexness” (imaginary part non-zero) instead of “technical complexness” (complex data type).
L ≔ '(2, π, i, i^2); Q ≔ X ↦ '(IsComplexType(X), IsComplex(X));
L @ Q
(false, false) (false, false) (true, true) (true, false)