#include <stdio.h> #include <numeric.h> #define N 2 /* data array size */ #define M 4 /* response array size */ int main() { array double u[N] = {10, 6}; array double v[M] = {2, 12, 22, 12}; array double r[M-1],p[M-1]; array double k[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=10.000000 6.000000 coef. of v=2.000000 12.000000 22.000000 12.000000 coef. of r=-1.000000 7.000000 -6.000000 coef. of p=-1.000000 -2.000000 -3.000000 coef. of k=0.000000