#include <stdio.h> #include <numeric.h> #define M 2 /* data array size */ #define N 4 /* response array size */ int main() { array double v[M] = {10, 6}; array double u[N] = {2, 12, 22, 12}; array double r[M-1],p[M-1]; array double k[N-M+1]; residue(u,v,r,p,k); printf("coef. of u=%f\n",u); printf("coef. of v=%f\n",v); printf("coef. of r=%f\n",r); printf("coef. of p=%f\n",p); printf("coef. of k=%f\n",k); }
coef. of u=2.000000 12.000000 22.000000 12.000000 coef. of v=10.000000 6.000000 coef. of r=0.078720 coef. of p=-0.600000 coef. of k=0.200000 1.080000 1.552000