You can distinguish different types of numbers in the Wolfram System by looking at their heads. (Although numbers in the Wolfram System have heads like other expressions, they do not have explicit elements which you can extract.)

If you use complex numbers extensively, there is one subtlety you should be aware of. When you enter a number like , the Wolfram System treats it as an approximate real number, but assumes that its imaginary part is exactly zero. Sometimes you may want to enter approximate complex numbers with imaginary parts that are zero, but only to a certain precision.

When the imaginary part is the exact integer , the Wolfram System simplifies complex numbers to real ones.

The distinction between complex numbers whose imaginary parts are exactly zero, or are only zero to a certain precision, may seem like a pedantic one. However, for example, when the interpretation of powers and roots of complex numbers is discussed in "Functions That Do Not Have Unique Values", the distinction becomes significant.

One way to find out the type of a number in Wolfram System is just to pick out its head using Head[expr]. For many purposes, however, it is better to use functions like IntegerQ that explicitly test for particular types. Functions like this are set up to return True if their argument is manifestly of the required type, and to return False otherwise. As a result, IntegerQ[x] will give False unless has an explicit integer value.