<< Previous | Next >> | |
|
float poly( float x, int n, float c[] );
Description
- Computes polynomial value by Horner's method. For example, for the fourth-order polynomial
10x
4- 3x
2+ 4x + 6
,n
would be 4 and the coefficients would bec[4] = 10.0
c[3] = 0.0
c[2] = -3.0
c[1] = 4.0
c[0] = 6.0Parameters
- 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 |