{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture 8 Notes

# 000 0784 1571 2357 3142 3927 4712 5498 6283 sinx 0000

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: largest ﬂoaJng point number? x = (1.5)*2^1 => (1.5+eps)*2^1 = x + eps*2^1 = 3 + 2*eps is next largest ﬂoaJng point number 8 2/20/14 eps •  x = (1+f)2^e •  For x = 9, what is the next largest ﬂoaJng point number? x = (1.125)*2^3 => (1.125+eps)*2^3 = x + eps*2^3 = 9 + 8*eps is next largest ﬂoaJng point number ﬂoatgui.m •  Numbers within [2^e, 2^(e+1)] are equally spaced •  One and eps and are in red •  t = number bits used to store f (52 in IEEE 754) –  2^t*f is an integer, 0<=2^t*f<=2^t •  emin < e < emax (- 1022 <= e < 1- 23 in IEEE 754) •  logscale shows distribuJon of numbers within each binary interval is the same •  What is the pa|ern? –  For x=(1+f)2^e –  The diﬀerence between x and the next largest ﬂoaJng point numbers is (2^e)*eps! •  What does this mean in pracJce? –  Big numbers are “further apart” than small numbers –  We can represent small values very precisely, as values increase, the absolute precision drops –  But relaJve precision remains the same (this is great) Regarding the QuesJon… The loop terminates, final value of k is 53, i.e. 1==1+eps/2! ! k = 0; while 1 + 1/2^k > 1 k = k+1; end k Insight Through CompuJng The Moral The 1991 Patriot Missile Disaster Elementary misperceptions about the finiteness of computer arithmetic. 30+ died. To produce reliable numerical results you must appreciate ﬂoaJng point arithmeJc. Insight Through CompuJng Insight Through CompuJng 9 2/20/14 The Sevng External clock counts Jme in tenths of seconds. TargeJng soXware needs Jme to compute trajectories. The method: Time = (# external clock Jcks) x (1/10) The problem is here Insight Through CompuJng One- Tenth in Binary Exact: .00011001100110011001100110011… Patriot System used: .00011001100110011001100110011… Error = .000000095sec every clock Jck Insight Through CompuJng Error Time = (# external clock Jcks) x (1/10) Error = (# external clock Jcks) x (.000000095) Insight...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online