Polynomial Evaluation. Straightforward Evaluation P(x) = 3x 5 +2x 4 +7x 3 +8x 2 +2x+4P(x) = 3x 5 +2x 4 +7x 3 +8x 2 +2x+4 t1 = (3*x*x*x*x*x)t1 = (3*x*x*x*x*x)

Slides:



Advertisements
Similar presentations
2 pt 3 pt 4 pt 5pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2pt 3 pt 4pt 5 pt 1pt 2pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4pt 5 pt 1pt Integer Addition Integer Subtraction.
Advertisements

Test practice Multiplication. Multiplication 9x2.
FFT1 The Fast Fourier Transform. FFT2 Outline and Reading Polynomial Multiplication Problem Primitive Roots of Unity (§10.4.1) The Discrete Fourier Transform.
Congruence class arithmetic. Definitions: a ≡ b mod m iff a mod m = b mod m. a  [b] iff a ≡ b mod m.
Algorithm Design Techniques: Induction Chapter 5 (Except Sections 5.6 and 5.7)
Algorithm Design Techniques: Induction Chapter 5 (Except Section 5.6)
FFT1 The Fast Fourier Transform by Jorge M. Trabal.
Exponents, Polynomials, and Polynomial Functions.
Integers: Multiplication & Division
1.4-5: Multiplying Integers: Basic Rules. Ways to Express multiplication Remember: All of these mean the same thing: Five times four 5 × 4 5 · 4 5(4)
CSE 321 Discrete Structures Winter 2008 Lecture 10 Number Theory: Primality.
1.2 - Products Commutative Properties Addition: Multiplication:
1.4 MULTIPLICATION WITH NEGATIVE NUMBERS 1.5 DIVISION WITH NEGATIVE NUMBERS Catherine Conway Math 081.
FFT1 The Fast Fourier Transform. FFT2 Outline and Reading Polynomial Multiplication Problem Primitive Roots of Unity (§10.4.1) The Discrete Fourier Transform.
The Fast Fourier Transform
Algebra 1 Notes: Lesson 8-5: Adding and Subtracting Polynomials.
Section 4.1 The Product, Quotient, and Power Rules for Exponents.
Objective 3 Multiplying and Dividing Integers © 2000 by R. Villar All Rights Reserved.
1.2 - Products Commutative Properties Addition: Multiplication:
Multiplying and Dividing Integers When you MULTIPLY: Two positives equal a positive Two negatives equal a positive One positive & one negative equal.
Multiply and Divide Integers
Divisibility Rules and Finding Factors
Finding Square Roots Grade 8 Ms. Stewart COPY SLIDES WHEN YOU SEE THIS.
Objective 9.1 Students will be able to: classify polynomials and write polynomials in standard form; evaluate polynomial expressions; add and subtract.
Basic Control Structures
Fast calculation methods. Addition  Add 137,95 Solution: = (137-5)+100= = 232.
Multiplication of Exponential Expressions with the Same Base Evaluate each expression, and compare the results obtained in the first column with the corresponding.
Evaluating Integer Expressions Friday, December 25, 2015.
Order of Operations By Carl Stephen. Order of Operations  Parentheses  Exponents  Square roots  Multiplication  Division  Addition  Subtraction.
Polynomial and Synthetic Division Objective: To solve polynomial equations by long division and synthetic division.
7-1 Integer Exponents 7-2 Powers of 10 and Scientific Notation 7-3 Multiplication Properties of Exponents 7-4 Division Properties of Exponents 7-5 Fractional.
ПЕЧЕНЬ 9. Закладка печени в период эмбрионального развития.
Interesting Integers – Part Dos
Warm Up Compute the following by using long division.
Integers Rules of Operation.
Integer Rules Memorize the Rules.
Congruence class arithmetic
Addition/ Subtraction
Dividing Polynomials Long Division A little review:
5.1 – Basic Properties & Reducing to Lowest Terms
Chapter 5 Polynomials.
Objective: To Divide Integers
Multiplying and Dividing Integers
Multiplying Integers.
1 Step Equation Practice + - x ÷
Multiplication and Division by Powers of Ten
Warm-Up Given two three-digit numbers abb and abc, find the value for digits a, b, c, d, and e. Here are the clues: a + b = c abc + abb = ddd.
Lecture 5 Multiplication and Division
Essential Questions How do we use the Factor Theorem to determine factors of a polynomial? How do we factor the sum and difference of two cubes.
FOUR RULES OF WHOLE NUMBERS
Unit 1. Day 7..
The Fast Fourier Transform
Connecting Algebra Tiles to Integer Tiles
Divisibility Rules.
Title of Notes: Multiplying and Dividing Integers pg. 9 RS
Squares.
Divisibility Rules.
Divisibility Rules.
Exponents and Order of Operations
Dividing Polynomials (Long Division)
The Fast Fourier Transform
Number Lines.
Section 6.3 – Polynomial Division
EXPONENTS… RULES?!?! X ? X 5 2 =.
Clements MAΘ October 30th, 2014
DIRECTED NUMBERS.
Dividing Fractions Multiply and divide decimals and fractions, using efficient and generalizing procedures, including standard algorithms.
Multiplication and Division of Integers
Division of Polynomials
Divide two Integers.
Presentation transcript:

Polynomial Evaluation

Straightforward Evaluation P(x) = 3x 5 +2x 4 +7x 3 +8x 2 +2x+4P(x) = 3x 5 +2x 4 +7x 3 +8x 2 +2x+4 t1 = (3*x*x*x*x*x)t1 = (3*x*x*x*x*x) t2 = t1 + (2*x*x*x*x)t2 = t1 + (2*x*x*x*x) t3 = t2 + (7*x*x*x)t3 = t2 + (7*x*x*x) t4 = t3 + (8*x*x)t4 = t3 + (8*x*x) P = t4 +(2*x) + 4P = t4 +(2*x) Multiplications, 5 Additions15 Multiplications, 5 Additions

A Little Smarter P(x) = 3x 5 +2x 4 +7x 3 +8x 2 +2x+4P(x) = 3x 5 +2x 4 +7x 3 +8x 2 +2x+4 t1 := 4; xp := x;t1 := 4; xp := x; t2 := (2*xp) + t1; xp := xp * x;t2 := (2*xp) + t1; xp := xp * x; t3 := (8*xp) + t2; xp := xp * x;t3 := (8*xp) + t2; xp := xp * x; t4 := (7*xp) + t3; xp := xp * x;t4 := (7*xp) + t3; xp := xp * x; t5 := (2*xp) + t4; xp := xp * x;t5 := (2*xp) + t4; xp := xp * x; P := (3*xp) + t5;P := (3*xp) + t5; 9 Multiplications, 5 Additions9 Multiplications, 5 Additions

Horner’s Rule P(x) = 3x 5 +2x 4 +7x 3 +8x 2 +2x+4P(x) = 3x 5 +2x 4 +7x 3 +8x 2 +2x+4 t1 = (3*x) + 2t1 = (3*x) + 2 t2 = (t1*x) + 7t2 = (t1*x) + 7 t3 = (t2*x) + 8t3 = (t2*x) + 8 t4 = (t3*x) + 2t4 = (t3*x) + 2 P = (t4*x) + 4P = (t4*x) Multiplications, 5 Additions5 Multiplications, 5 Additions

Computing Powers xp := x; pwork := power; Res := 1; While pwork > 0 Do If pwork mod 2 = 1 then If pwork mod 2 = 1 then Res := Res * xp; Res := Res * xp; End If End If xp := xp * xp; xp := xp * xp; pwork := pwork / 2; /* integer division */ pwork := pwork / 2; /* integer division */ End While

For Power = 15 6 Multiplications by Squaring Algorithm6 Multiplications by Squaring Algorithm An Alternative Procedure:An Alternative Procedure: p = x * xp = x * x p = p * p *xp = p * p *x p = p * p * pp = p * p * p 5 Multiplications by Factorization5 Multiplications by Factorization