HP 15c User Manual

Page 155

Advertising
background image

Appendix: Accuracy of Numerical Calculations

155

with [ (10

14

$) = 0.7990550814, although the true

sin (10

14

$) = −0.78387…

The wrong sign is an error too serious to ignore; it seems to suggest a defect in the calculator.
To understand the error in trigonometric functions we must pay attention to small differences
among π and two approximations to π:

true π

= 3.1415926535897932384626433 ...

key $

= 3.141592654

(matches π to 10 digits)

internal p

= 3.141592653590

(matches π to 13 digits)

Then all is explained by the following formula for the calculated value:
[(x) = sin(x π / p) to within ±0.6 units in its last (10th) significant digit.

More generally, if trig(x) is any of the functions sin(x), cos(x), or tan(x), evaluated in real
Radians mode, the HP-15C produces

Æ(x) = trig(x π / p)

to within ±0.6 units in its 10th significant digit.

This formula has important practical implications:

Since π / p = 1 − 2.0676... × 10

-13

/ p = 0.9999999999999342 ..., the value produced by

Æ (x) differs from trig(x) by no more than can be attributed to two perturbations:
one in the 10th significant digit of the output trig(x), and one in the 13th significant
digit of the input x.

If x has been calculated and rounded to 10 significant digits, the error inherited in its
10th significant digit is probably orders of magnitude bigger than Æ's second
perturbation in x's 13th significant digit, so this second perturbation can be ignored
unless x is regarded as known or calculated exactly.

Every trigonometric identity that does not explicitly involve π is satisfied to within

roundoff in the 10th significant digit of the calculated values in the identity. For
instance,

sin

2

(x) + cos

2

(x) = 1, so ([(x))

2

+ (\(x))

2

=1

sin(x)/cos(x) = tan(x), so [(x) / \(x) = ](x)

with each calculated result correct to nine significant digits for all x. Note that \(x)
vanishes for no value of x representable exactly with just 10 significant digits. And if 2x
can be calculated exactly given x,

sin(2x) = 2 sin(x)cos(x), so [(2x) = 2[(x) \(x)

to nine significant digits. Try the last identity for x = 52174 radians on the HP-15C:

Advertising