subject
Mathematics, 04.11.2019 22:31 marisolrojo2002

There is a more efficient algorithm (in terms of the number of multiplications and additions used) for evaluating polynomials than the conventional algorithm described in the previous exercise. it is called horner's method. this pseudocode show how to use this method to find the value of
a_nx^n+a_{n−1}x^{n−1}++a_1x+a_ 0 at x=c
procedure horner(c, a₀, a₁, a₂ a_n: real numbers)
y: =a_n
for i: =1 to n
y: =y∗c+a_{n-i}
{y=a_nc^n+a_{n-1}c^{n-1}++a_1c +a_0}
a) evaluate 3x²+x+1 at x=2 by working through each step of the algorithm showing the values assigned at each assignment step.
b) exactly how many multiplications and additions are used by this algorithm to evaluate a polynomial of degree n at x=c? (do not count additions used to increment the loop variable.

ansver
Answers: 2

Other questions on the subject: Mathematics

image
Mathematics, 21.06.2019 14:30, lethycialee79711
Which fraction below is equivalent to 10/12?
Answers: 1
image
Mathematics, 21.06.2019 17:00, KillerSteamcar
The general form of the quetion of a circle is ax^2+by^2+cx+dy+e=0 where a=b=0 if the circle has a radius of three units and the center lies on the y axis which set of values of a, b, c, d, and e might correspond to the circle
Answers: 1
image
Mathematics, 21.06.2019 20:00, christpress0
Given the equation y − 4 = three fourths(x + 8) in point-slope form, identify the equation of the same line in standard form. −three fourthsx + y = 10 3x − 4y = −40 y = three fourthsx + 12 y = three fourthsx + 10
Answers: 1
image
Mathematics, 21.06.2019 20:30, shonesam98
Apinhole camera is made out of a light-tight box with a piece of film attached to one side and pinhole on the opposite side. the optimum diameter d(in millimeters) of the pinhole can be modeled by d=1.9[ (5.5 x 10^-4) l) ] ^1/2, where l is the length of the camera box (in millimeters). what is the optimum diameter for a pinhole camera if the camera box has a length of 10 centimeters
Answers: 1
You know the right answer?
There is a more efficient algorithm (in terms of the number of multiplications and additions used) f...

Questions in other subjects:

Konu
English, 12.08.2021 22:10