Functions > Utility Functions > Example: Using Complex Number Functions
Example: Using Complex Number Functions
1. Define a complex number.
Click to copy this expression
2. Use Re and Im functions to get the real part and the imaginary part of z.
Click to copy this expression
Click to copy this expression
3. Use the arg function to get the principal argument of z, between −π and π.
Click to copy this expression
4. Use the csgn function to get the sign of the following complex numbers.
Click to copy this expression
Click to copy this expression
Click to copy this expression
5. Use the signum function to get the sign of a complex number.
Click to copy this expression
6. Compare the signum function with the result of the following expression.
Click to copy this expression
The above expression is how signum is calculated when z is not zero.
7. Use signum with 0 as the first argument.
Click to copy this expression
The function returns the second argument, when z=0.
Was this helpful?