is the head used for complex numbers.
Examplesopen allclose all
Enter a purely imaginary number:
Even though there is no real part it has Head Complex:
The FullForm of a complex number x+Iy is Complex[x,y]:
Enter a complex number using the FullForm:
If the imaginary part is exactly zero, then the result is not Complex:
You have to use Re and Im to extract parts of Complex numbers:
Part does not work:
Enter a complex number with machine-number real and imaginary parts:
It is considered to be a machine number when both its real and imaginary parts are machine numbers:
Enter a complex number with arbitrary-precision real and imaginary parts:
The precision is based on the error in the complex plane:
Enter a complex number with an exact real part and an approximate imaginary part:
_Complex can be used to stand for a complex number in a pattern:
A rule that switches real and imaginary parts:
Properties & Relations (3)
Complexes are atomic objects with no subexpressions:
Use Complexes to indicate assumptions on domain conditions:
Wolfram Research (1988), Complex, Wolfram Language function, https://reference.wolfram.com/language/ref/Complex.html.
Wolfram Language. 1988. "Complex." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Complex.html.
Wolfram Language. (1988). Complex. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Complex.html