beautypg.com

HP 15c User Manual

Page 173

background image

Appendix: Accuracy of Numerical Calculations

173

Keystrokes

Display

÷

021- 10

|K

022- 43 36

|(

023- 43 33

÷

024- 10

|n

025- 43 32

´b.9

026-42,21,.9

¤

027- 11

lV

028- 45 25

|(

029- 43 33

÷

030- 10

®

031- 34

|K

032- 43 36

÷

033- 10

´V

034- 42 25

v

035- 36

´}

036- 42 30

037- 16

´}

038- 42 30

|n

039- 43 32

The method uses d = b

2

ac.

If d < 0, then the roots are a complex conjugate pair

 

a

d

i

a

b

.

If d ≥ 0, then the roots are real numbers x and y calculated by

)

(

sgn b

d

b

s

a

s

x

/

0.

s

if

0

0

s

if

/ s

c

y

The s calculation avoids destructive cancellation.

When a = 0 ≠ b, the larger root x, which should be ∞, encounters division by zero (Error 0)
that can be cleared by pressing ) three times to exhibit the smaller root y correctly
calculated. But when all three coefficients vanish, the Error 0 message signals that both
roots are arbitrary.