Tests if the data type of
X is considered a real type.
Xis any object
true iff the data type of
X is considered a real data type. These include
real vectors, and
complex 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
IsReal function instead. This tests for “mathematical realness” (imaginary part equal to zero) instead of “technical realness” (real data type).
L ≔ '(2, π, i, i^2); Q ≔ X ↦ '(IsRealType(X), IsReal(X));
L @ Q
(true, true) (true, true) (false, false) (false, true)