By default, new variables are assumed to be real; functions which work with the real and imaginary parts of variables will assume that a variable is real. For example, re returns the real part of its argument and im returns the imaginary part (see Section 7.4.2), and so
re(z) |
returns z and
im(z) |
returns 0.
If you want variables to be complex by default, you can have Xcas use complex variable mode. You can set this from the CAS configuration screen (see Section 2.5.7). Your choice will be stored in the variable complex_variables, where a value of 0 means that Xcas will assume that variables are real and and a value of 1 means that Xcas will assume that variables are complex. Your choice will be stored in the configuration file (see Section 2.5.10), and so can also be set there.