Question: 5-8) Write a function (in Python, Java, or C++) for efficiently evaluating the following polynomials and count the number of multiplications and additions needed.
5-8) Write a function (in Python, Java, or C++) for efficiently evaluating the following polynomials and count the number of multiplications and additions needed. The function should take in a polnomial in the standard array form with coefficient of the lowest power first and the coefficient of the highest power last. The function can call an already written Horner's Method function so you don't have to redo writing code for it. 5) P (x) = ax + ax + ax 6) P(x) = a +ax + ax + x 7) P(x)= ax + ax + ax 8) P(x) = ax + ax + ax + ax"
Step by Step Solution
There are 3 Steps involved in it
The task is to write a function for efficiently evaluating polynomials using Horners method Horners method is an algorithm to evaluate polynomial equa... View full answer
Get step-by-step solutions from verified subject matter experts
