/* fitval.c CCMATH mathematics library source code. * * Copyright (C) 2000 Daniel A. Atkinson All rights reserved. * This code may be redistributed under the terms of the GNU library * public license (LGPL). ( See the lgpl.license file for details.) * ------------------------------------------------------------------------ */ #include #include static double *h,dl=1.e-8; double fitval(double x,double *s,double *par,double (*fun)(), double *v,int n) { double f,r,d; int i,j; f=(*fun)(x,par); for(i=0; i