/* deriv.h compute formulas for numerical derivatives */ /* returns npoints values in a or c */ /* 0 <= polong < npoints */ /* define 'digits' before use */ void deriv(long order, long npoints, long point, long *a, long *bb); /* c[point][] = (1.0/((double)bb*h^order))*a[] */ void rderiv(long order, long npoints, long point, double h, double c[]); /* c includes bb and h^order */ /* derivative of f(x) = c[0]*f(x+(0-point)*h) + */ /* c[1]*f(x+(1-point)*h) + */ /* c[2]*f(x+(2-point)*h) + ... + */ /* c[npoints-1]*f(x+(npoints-1-point)*h */