Approximations and Round-Off Errors Chapter 3

Approximations and Round-Off Errors Chapter 3

Chapter 3 by Lale Yurttas, Texas A &M University Chapter 3 Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Approximations and Round-Off Errors Chapter 3 For many engineering problems, we cannot obtain analytical solutions. Numerical methods yield approximate results, results that are close to the exact analytical solution. We cannot exactly compute the errors associated with numerical methods. Only rarely given data are exact, since they originate from measurements. Therefore there is probably error in the input information. Algorithm itself usually introduces errors as well, e.g., unavoidable

round-offs, etc The output information will then contain error from both of these sources. How confident we are in our approximate result? The question is how much error is present in our calculation and is it tolerable? by Lale Yurttas, Texas A &M University Chapter 3 Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 2 Accuracy. How close is a computed or measured value to the true value Precision (or reproducibility). How close is a computed or measured value to previously computed or measured values.

Inaccuracy (or bias). A systematic deviation from the actual value. Imprecision (or uncertainty). Magnitude of scatter. by Lale Yurttas, Texas A &M University Chapter 3 Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3 Fig. 3.2 by Lale Yurttas, Texas A &M University Chapter 3 Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

4 Significant Figures Number of significant figures indicates precision. Significant digits of a number are those that can be used with confidence, e.g., the number of certain digits plus one estimated digit. 53,800 How many significant figures? 5.38 x 104 5.380 x 104 5.3800 x 104 3 4 5 Zeros are sometimes used to locate the decimal point not significant figures. 0.00001753 0.0001753 0.001753

by Lale Yurttas, Texas A &M University 4 4 4 Chapter 3 Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5 Error Definitions True Value = Approximation + Error Et = True value Approximation (+/-) True error true error True fractional relative error

true value true error True percent relative error, t 100% true value by Lale Yurttas, Texas A &M University Chapter 3 Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 6 For numerical methods, the true value will be known only when we deal with functions that can be solved analytically (simple systems). In real world applications, we usually not know the answer a priori. Then Approximate error

a 100% Approximation Iterative approach, example Newtons method Current approximation - Previous approximation a 100% Current approximation (+ / -) by Lale Yurttas, Texas A &M University Chapter 3 Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 7 Use absolute value.

Computations are repeated until stopping criterion is satisfied. a s Pre-specified % tolerance based on the knowledge of your solution If the following criterion is met s (0.5 10(2-n) )% you can be sure that the result is correct to at least n significant figures. by Lale Yurttas, Texas A &M University Chapter 3 Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

8 Round-off Errors Numbers such as , e, or 7 cannot be expressed by a fixed number of significant figures. Computers use a base-2 representation, they cannot precisely represent certain exact base-10 numbers. Fractional quantities are typically represented in computer using floating point form, e.g., Integer part m.be mantissa by Lale Yurttas, Texas A &M University exponent Base of the number system used Chapter 3

Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 9 Figure 3.3 by Lale Yurttas, Texas A &M University Chapter 3 Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 10 Figure 3.4 by Lale Yurttas, Texas A &M University

Chapter 3 Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 11 Figure 3.5 by Lale Yurttas, Texas A &M University Chapter 3 Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 12 156.78

0.15678x103 in a floating point base-10 system 1 Suppose only 4 0.029411765 34 decimal places to be stored 1 0 0.029410 m 1 2 Normalized to remove the leading zeroes. Multiply the mantissa by 10 and lower the exponent by 1 0.2941 x 10-1 by Lale Yurttas, Texas A &M University Additional significant figure

is retained Chapter 3 Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 13 1 m 1 b Therefore for a base-10 system 0.1 m<1 for a base-2 system 0.5 m<1 Floating point representation allows both fractions and very large numbers to be expressed on the computer. However, Floating point numbers take up more room. Take longer to process than integer numbers. Round-off errors are introduced because mantissa

holds only a finite number of significant figures. by Lale Yurttas, Texas A &M University Chapter 3 Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 14 Chopping Example: =3.14159265358 to be stored on a base-10 system carrying 7 significant digits. =3.141592 chopping error t=0.00000065 If rounded =3.141593 t=0.00000035 Some machines use chopping, because rounding adds to the computational overhead. Since number of

significant figures is large enough, resulting chopping error is negligible. by Lale Yurttas, Texas A &M University Chapter 3 Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 15

Recently Viewed Presentations

  • Renewed Research for Patient Benefit Programme

    Renewed Research for Patient Benefit Programme

    NB schemes don't fit neatly like this, but need a way to structure it!! About NIHR. ... a halving in the number of days lost from work, and improved physical function for patients. ... Efficacy and Mechanism Evaluation (EME) which...
  • Resting membrane potential and action potential OBJECTIVES  At

    Resting membrane potential and action potential OBJECTIVES At

    6. Diameter of Na+ channels is greater than K+ channels. (T/F) 7. Na-K Pump is the main contributor in the development of negativity inside the cell. (T/F) 8. Potassium ions are more permeable through the leak channels than sodium ions...
  • Chapter

    Chapter

    Chapter 21 Biochemistry ... C6H12O6 blood, plants, fruit, honey Fructose (mono) C6H12O6 plants, fruit, honey Galactose (mono) C6H12O6 Sucrose (disac) C12H22O11 sugar cane & beets, maple syrup, fruits & veggies Maltose (disac) C12H22O11 partial hydrolysis of starch Lactose (disac) C12H22O11...
  • Protecting Personal Information at Fermilab What You Will

    Protecting Personal Information at Fermilab What You Will

    Identity theft based on improper disclosure of personal information is a serious problem Several government agencies have been embarrassed by losses of large quantities of personal data Orders from White House --> DOE --> Office of Science mandate more careful...
  • Classical Greece - Weebly

    Classical Greece - Weebly

    Greece Geography. Water, water everywhere. Islands. Hilly terrain on land. What results? Mount Olympus. This mountain was thought by many Greeks to be a hangout for Zeus and other major Greek gods. Classical Greek mythology about the twelve major gods...
  • Évaluation des logiciels interactifs

    Évaluation des logiciels interactifs

    Ces approches sont adoptées également par des chercheurs en EIAH par exemple : comme Ken Koedinger et Kaye Stacey Par exemple, Koedinger développe des tuteurs intelligents mais dans le cadre d'un curriculum et en concevant aussi les livres et textes...
  • IBM mail support for MS Outlook Today, Tomorrow,

    IBM mail support for MS Outlook Today, Tomorrow,

    Familiar login experience. Login session valid for 13 hours. When you launch outlook, you'll be prompted to authenticate using your connections cloud credentials. Each login session is valid for 13 hours. IBM's statements regarding its plans, directions and intent are...
  • Deadlocks - UNR

    Deadlocks - UNR

    Times New Roman Wingdings Tahoma plain white Deadlocks Resources Resources (1) Resources (2) Introduction to Deadlocks Four Conditions for Deadlock Deadlock Modeling (2) Deadlock Modeling (3) Deadlock Modeling (4) Deadlock Modeling (5) The Ostrich Algorithm Detection with One Resource of...