<< Previous | Next >>

poly

float poly( float x, int n, float c[] );

Description

Computes polynomial value by Horner's method. For example, for the fourth-order polynomial 10x- 3x+ 4x + 6, n would be 4 and the coefficients would be

   

c[4] = 10.0
c[3] =  0.0
c[2] = -3.0
c[1] =  4.0
c[0] =  6.0

Parameters

x
Variable of the polynomial.

n
The order of the polynomial

c
Array containing the coefficients of each power of x.

Return value

The polynomial value.

Library

MATH.LIB


Dynamic C Functions << Previous | Next >> rabbit.com