130 Section 11: Calculating With Complex NumbersStoring and Recalling Complex Numbers

The O and l functions act on the real X-register only; therefore, the imaginary part of a complex number must be stored or recalled separately. The keystrokes to do this can be entered as part of a program and executed automatically.*

To store a + ib from the complex X-register to R1 and R2, you can use the sequence

O1 ´} O2

You can follow this by ´ } to return the stack to its original condition if desired. To recall a + ib from R1 and R2 you can use the sequence

l1 l2 ´V

If you wish to avoid disturbing the rest of the stack, you can recall the number using the sequence

l2 ´} − l1(In Program mode, use `instead of .)

Operations With Complex Numbers

Almost all functions performed on real numbers will yield the same answer whether executed in or out of Complex mode,† assuming the result is also real. In other words, Complex mode does not restrict your ability to calculate with real numbers.

Any functions not mentioned below or in the rest of this section (Calculating With Complex Numbers) ignore the imaginary stack.

*You can use the HP-15C matrix function, described in section 12, to make storing and recalling complex numbers more convenient. By dimensioning a matrix to be n×2, n complex numbers can be stored as rows of the matrix. (This technique is demonstrated in the HP-15C Advanced Functions Handbook, section 3, under Applications.)

The exceptions are : and ;, which operate differently in Complex mode in order to facilitate converting complex numbers to polar form (page 133).