Write C Functions Evaluate Polynomials Using Horner S Algorithm Q37148569

Write C functions to evaluate polynomials using horner’salgorithm


Solution


`Hey,

Note: Brother in case of any queries, just comment inbox I would be very happy to assist all your queries

double horner(double poly[], int n, int x)
{
double result = poly[0]; // Initialize result
int i;
// Evaluate value of polynomial using Horner’s method
for ( i=1; i<n; i++)
result = result*x + poly[i];
  
return result;
}

Kindly revert for any queries

Thanks.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.