/* test_laphi.c family of Lagrange functions and derivatives */ /* L_n,j(x) = product i=0,n i!=j (x-x_i)/(x_j-x_i) */ /* for points x_0, x_1, ... , x_n */ /* generate L_n,j(x) for n=1,5 j=0,n and derivatives to 4th */ /* should be same results as produced by lagrange_fem.c */ #include #include "laphi.h" int main(int argc, char *argv[]) { int N = 5; int j, k, n; double h, hf; double xg[7]; double x, y, yp, ypp, yppp, ypppp; double xmin = 0.0; /* xg[0] */ double xmax = 1.0; /* xg[n] */ printf("test_laphi.c running on 0