/* Example for poly */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
void main() {
double coeff[4], x = 1.2, y;
coeff[0] = 0.0;
coeff[1] = 1.0;
coeff[2] = 2.0;
coeff[3] = 3.0;
y = poly(x, 3, coeff);
printf("poly(%g, 3, {%g, %g, %g, %g}) = %g\n",
x, coeff[0], coeff[1],
coeff[2], coeff[3], y);
}