beautypg.com

Complex results from real numbers, Conditional tests – HP 15c User Manual

Page 132

background image

132 Section 11: Calculating With Complex Numbers

Conditional Tests

For programming, the four conditional tests below will work in the complex
sense: ~ and T 0 compare the complex number in the (real and
imaginary) X-registers to 0 + 0i, while T 5 and T

6 compare the

complex numbers in the (real and imaginary) X- and Y-registers. All other
conditional tests besides those listed below ignore the imaginary stack.

~ T 0 (x ≠ 0) T 5 (x = y) T 6 (x ≠ y)

Example: Complex Arithmetic. The characteristic impedance of a ladder
network is given by an equation of the form

B

A

Z

0

,

where A and B are complex numbers. Find Z

0

for the hypothetical values

A = 1.2 + 4.7i and B = 2.7 + 3.2i.

Keystrokes

Display

1.2

v 4.7 ´ V

1.2000

Enters A into real and
imaginary X-registers.

2.7

v 3.2 ´ V

2.7000

Enters B into real and
imaginary X-registers,
moving A into real and
imaginary Y-registers.

÷

1.0428

Calculates A/B.

¤

1.0491

Calculates Z

0

and

displays real part.

´ % (hold)

0.2406

Displays imaginary part
of Z

0

while % is held

down.

(release)

1.0491

Again displays real part
of Z

0

.