28.11.2014 Views

MTH3051 Introduction to Computational Mathematics - User Web ...

MTH3051 Introduction to Computational Mathematics - User Web ...

MTH3051 Introduction to Computational Mathematics - User Web ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

School of Mathematical Sciences<br />

Monash University<br />

approach (one that can be used for other more challenging computations). We will start<br />

by writing both x and y in the standard form<br />

Thus we have<br />

then<br />

x = (a + 10 −N b) × 10 m<br />

y = (c + 10 −N d) × 10 n<br />

˜x = a × 10 m , E R (x) = 10 −N × (b × 10 m )<br />

ỹ = c × 10 m , E R (y) = 10 −N × (d × 10 m )<br />

x<br />

y = a + 10−N b<br />

c + 10 −N d 10m−n<br />

On most computers N ≈ 15. So 10 −N d is much smaller than c. Thus we can use a<br />

Taylor series for 1/(1 + 10 −N (d/c)) in powers of 10 −N <strong>to</strong> produce<br />

x<br />

y = 1 c (a + 10−N b)10 m−n (1 − 10 −N d d2<br />

+ 10−2N<br />

c c − · · · )<br />

2<br />

If we retain just the first two terms in the series then we obtain (after a wee bit of<br />

algebra)<br />

( (<br />

x a b<br />

y = c + 10−N c − ad ))<br />

10 m−n + O ( 10 −2N)<br />

c 2<br />

Our computer will compute the approximation ˜z <strong>to</strong> the exact value z = x/y with a<br />

round off error which we denote by E R (z). We have z = ˜z + E R (z) and (ignoring any<br />

carries)<br />

˜z = a c × 10m−n<br />

E R (z) = 10 −N ( b<br />

c − ad<br />

c 2 )<br />

10 m−n<br />

= 10 −N O (z)<br />

This last line shows that our N− digit computer will return an estimate for z = x/y<br />

accurate <strong>to</strong> N digits. This is good! We rejoice (in moderation).<br />

This is a very general technique and it can be applied <strong>to</strong> any function <strong>to</strong> analyse its<br />

sensitivity <strong>to</strong> round-off errors. It is well worth your time studying the above example in<br />

detail (as you always do, n’est pas?).<br />

16-Feb-2014 34

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!