8 ? 10x + 7x 2 ? 2x 3 + 3x 4 + 12x 5 , <?xml:namespace prefix = o ns = \"urn:sch
ID: 3075478 • Letter: 8
Question
8 ? 10x + 7x2 ? 2x3 + 3x4 + 12x5, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>
when x is replaced by an arbitrary (but fixed) real number r.
For this particular instance, n = 5 and a0 = 8, a1 = ?10, a2 = 7, a3 = ?2, a4 = 3, and a5 = 12.
procedure PolynomialEvaluation1
(n: nonnegative integer;
r,a0,a1,a2,. . .,an: real)
begin
product := 1.0
value := a0
for i := 1 to n do
begin
product := product * r
value := value + ai * product
end
end
a) How many additions take place in the evaluation of the given polynomial? (Do not include the n ? 1 additions needed to increment the loop variable i.) How many multiplications?
b) Answer the questions in part (a) for the general polynomial a0 + a1x + a2x2 + a3x3 +
Explanation / Answer
question not clear
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.