This is an old revision of the document!



Entering complex numbers

A complex number can be represented mathematically in rectangular form as $z = x + iy$ or in polar form as $z = re^{i\theta}$. To enter a complex number simply enclose the real and imaginary parts in parenthesis. For example, the complex number $5+3i$ would be entered (in rectangular form) as (5, 3) or (5 3) or in polar form as (5.83, ∡30.96)1). Alternatively, a complex number can be created from two numbers on the stack using the command R→C:

5 3 R→C

The inverse command to break down a complex number is C→R 2). The real or imaginary parts of a complex number can be returned using the commands RE or IM, respectively. Converting between rectangular and polar representation can be done using the commands →POLAR and →RECT, respectively. It is also possible to enter complex numbers in different bases, although commands and operations between complex numbers will always return the result in base 10. For example, to enter the above example in base 2:

#101b #11b R→C

leading to (#101b,#11b) on the stack, but taking the complex conjugate (CONJ) would result in (5,-3) on the stack.

System flag -103 formally sets the calculator mode to complex: -103 SF.


Complex number arithmetic

Many of the functions that operate on regular (non-complex) numbers also operate on complex numbers. These functions include the basic arithmetic functions ($+,-,\times,\div$) along with many of the trigonometry ($\sin, \cos, \tan$) and power functions ($x^2, e^x, 10^x$) and their inverses.


Commands for complex numbers



1)
The keyboard shortcut for the angle symbol (∡) is AL-RS-6.
2)
Note, however, that this command does not remove the complex number from the stack, as occurs in the 50g stock ROM.
  • manual/chapter3/complex.1497729859.txt.gz
  • Last modified: 2017/06/17 13:04
  • by smartin