1 / 99

Numerical Analysis

Numerical Analysis. EE, NCKU Tien-Hao Chang (Darby Chang). In the previous slide. Why numerical methods? differences between human and computer a very simple numerical method What is algorithm? definition and components three problems and three algorithms Convergence

Télécharger la présentation

Numerical Analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Numerical Analysis EE, NCKU Tien-Hao Chang (Darby Chang)

  2. In the previous slide • Why numerical methods? • differences between human and computer • a very simple numerical method • What is algorithm? • definition and components • three problems and three algorithms • Convergence • compare rate of convergence

  3. In this slide • Error (motivation) • Floating point number system • difference to real number system • problem of roundoff • Introduced/propagated error • Focus on numerical methods • three bugs

  4. Let’s start from error • Numerical methods are generally designed to determine approximation solutions • 3 categories of error types • modeling: made when you decide the algorithm • discretization/truncation: conversion from continuous to discrete and/or truncation of an infinite series • roundoff/data: not due to the formulation of a numerical method, caused by the data representation (in computer)

  5. Can be analyzed • Numerical methods are generally designed to determine approximation solutions • 3 categories of error types • modeling: made when you decide the algorithm • discretization/truncation: conversion from continuous to discrete and/or truncation of an infinite series • roundoff/data: not due to the formulation of a numerical method, caused by the data representation (in computer)

  6. Should be prevented • Numerical methods are generally designed to determine approximation solutions • 3 categories of error types • modeling: made when you decide the algorithm • discretization/truncation: conversion from continuous to discrete and/or truncation of an infinite series • roundoff/data: not due to the formulation of a numerical method, caused by the data representation (in computer)

  7. 1.3 Floating Point Number Systems

  8. Restriction of must not be zero (except when the number being represented is 0)

  9. Floating point vs. real number • Discrete vs. continuous • continuous means that between any two numbers, there are infinitely many other numbers • Finite vs. infinite • number of element and range of values • a floating point number system contains its smallest/largest element • underflow/overflow

  10. Floating point vs. real number • Nonuniform vs. uniform • real numbers are uniformly distributed • in a floating point number system, the elements **** *** **** are more closely spaced • think about the difference between two adjacent elements while the exponent changes hint

  11. Floating point vs. real number • Nonuniform vs. uniform • real numbers are uniformly distributed • in a floating point number system, the elements **** *** **** are more closely spaced • think about the difference between two adjacent elements while the exponent changes

  12. Floating point vs. real number • Nonuniform vs. uniform • real numbers are uniformly distributed • in a floating point number system, the elements near the zero are more closely spaced • think about the difference between two adjacent elements while the exponent changes

  13. Floating point system is discrete, finite and nonuniform

  14. Roundoff error • When the number is outside the system • Select an element to represent the number • chop • round • A number to its floating point equivalent • y→fl(y)

  15. Roundoff error • When the number is outside the system • Select an element to represent the number • chop • round • A number to its floating point equivalent

  16. Formal definition

  17. An example

  18. In general case (chopped)

  19. In general case (chopped)

  20. Machine precision/epsilon • The error bound is independent of the number, y • It depends on • base () • the number of digits (k) • The bound is a function of the hardware implementation • Cause of roundoff error

  21. Formal definition

  22. Another term about precision

  23. So far, we talked about floating point number systems in abstract

  24. Then, what systems are we likely to encounter in practice?

  25. Real floating point system • 1970s • begun to develop a standard binary floating point numbers to eliminate inconsistencies • 1985 • IEEE • Binary Floating Point Arithmetic Standard 754 • The IEEE Standard • F(2,24,-125,128), single precision • F(2,53,-1021,1024), double precision

  26. IEEE standard single precision

  27. 1.4 Floating Point Arithmetic

  28. Motivation • Floating point arithmetic stands for the mathematics on the computer, but why should we know that? • The IEEE Standard • seems pretty accurate • However,

  29. Numerical methods perform a sequence of calculations on computer, where each operation introduces some roundoff error

  30. http://www.radgraphics.net/images/main/atomic%20explosion%20-%204.jpghttp://www.radgraphics.net/images/main/atomic%20explosion%20-%204.jpg when they are accumulated

  31. Typical arithmetic • Three steps • operand its floating point equivalent • the exact arithmetic • result its floating point equivalent

  32. Not associative • We should perform the arithmetic in ********* order to obtain the most accurate result question

  33. All intermediate results have been rounded

  34. Not associative • We should perform the arithmetic in ********* order to obtain the most accurate result

  35. Not associative • We should perform the arithmetic in Ascending order to obtain the most accurate result

  36. In FP arithmetic, always notice the number of significant digits and the least significant bits

  37. Not distributive

  38. Accumulation of roundoff error

  39. Introduced/propagated error

  40. Propagated error can be large even if the introduced error is small

  41. A notation in the analysis

  42. In multiplication

More Related