HP 15c User Manual

Page 64

Advertising
background image

64

Section 3: Calculating in Complex Mode

64

To require approximations with accurate components is to demand more than keeping
relative errors small. For example, consider this problem in which the calculations are done
with four significant digits. It illustrates the limitations imposed on a complex calculation by
finite accuracy.

z

1

= Z

1

= 37.1 + 37.3i

z

2

= Z

2

= 37.5 + 37.3i

and

Z

1

× Z

2

= (37

.

10 Ч

37.50 − 37.30 Ч

37.3

0

) +

i(37.10

Ч

37.30 + 37.30 Ч

37.50)

= (1391. −

1391.)

+ i(1384

.

+

1

399.)

=

0

+

i(2783.)

The true value z

1

z

2

= −0.04 + 2782.58i. Even though Z

1

and Z

2

have no error, the real part of

their four-digit product has no correct significant decimals, although the relative error of the
complex product is less than 2 × 10

−4

.

The example illustrates that complex multiplication doesn't propagate its errors component
wise. But even if complex multiplication produced accurate components, the rounding errors
of a chain computation could quickly produce inaccurate components. On the other hand, the
relative error, which corresponds to the precision of the calculation, grows only slowly.

For example, using four-digit accuracy as before

z

1

= (1 + 1/300) + i

Z

1

= 1.003 + i

z

2

= Z

2

= 1 + i

then

Z

1

× Z

2

= (1.003 + i) × (1 + i)

= 0.003 + 2.003i
= 3.000 × 10

−3

+ 2.003i

The correct four-digit value is 3.333 × 10

−3

+ 2.003i. In this example, Z

l

and Z

2

are accurate

in each component and the arithmetic is exact. But the product is inaccurate-that is, the real
component has only one significant digit. One rounding error causes an inaccurate
component, although the complex relative error of the product remains small.

For the HP-15C the results of any complex operation are designed to be accurate in the sense
that the complex relative error E(Z,z) is kept small. Generally, E(Z,z) < 6 × 10

−10

.

As shown earlier, this small relative error doesn't guarantee 10 accurate digits in each
component. Because the error is relative to the size |z|, and because this is not greatly
different from the size of the largest component of z, the smaller component can have fewer
accurate digits. There is a quick way for you to see which digits are generally accurate.
Express each component using the largest exponent. In this form, approximately the first 10
digits of each component are accurate. For example, if

Z = 1.234567890 × 10

−10

+ i(2.222222222 Ч 10

−3

),

Advertising