/* deriv.h compute formulas for numerical derivatives */ /* returns npoints values in a or c */ /* 0 <= point < npoints */ void deriv(int order, int npoints, int point, int *a, int *bb); /* c[point][] = (1.0/((double)bb*h^order))*a[] */ void rderiv(int order, int npoints, int 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 */ /* */ /* nuderiv give x values, not uniformly spaced, rather than h */ void nuderiv(int order, int npoints, int point, double x[], double c[]);