1 / 7

Introduction to Numerical Analysis I

Introduction to Numerical Analysis I. Evaluating a Polynomial. MATH/CMPSC 455. Evaluating a Polynomial. Question: What is the BEST way to evaluate a polynomial? . What does BEST mean?. To me, BEST means: Give right answer Number of operations is minimized (Addition, Multiplication)

ursula
Download Presentation

Introduction to Numerical Analysis I

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. Introduction to Numerical Analysis I Evaluating a Polynomial MATH/CMPSC 455

  2. Evaluating a Polynomial Question: What is the BEST way to evaluate a polynomial? What does BEST mean? • To me, BEST means: • Give right answer • Number of operations is minimized (Addition, Multiplication) • Easy to implement

  3. Example: Evaluate at Method 1: We need 14 operations: 10 multiplications and 4 additions

  4. Can we do better? Method 2: We need 11 operations, 7 multiplications and 4 additions

  5. Can we do even better (best)? Method 3: We need 8 operations, 4 multiplications and 4 additions!!

  6. Nested Multiplication Nested Multiplication (Horner’s method): We need 2n operations, n multiplications and n additions!!

  7. Example: HW1 Write a Matlab function that uses nested multiplication to evaluate a polynomial. See notes for a hint.

More Related