/* ATK IV - Numerical Programming (2006) */ /* Excercise 3.3 - Polynomial Interpolation */ #include #include #define NRANSI /*This definition is required by nr.h, see more in NR online book. */ #include int main(void){ float y, dy; float xa[] = {0,1,2,3,4}; float ya[] = {0,1,3,6,8}; float x = 2.5; int n=4; polint(xa,ya,n,x,&y,&dy); printf("%f\n",y); return 0; }