/* seqlsq.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 double seqlsq(double *x,double *y,int n,double *par,double *var,int m, double de,double (*func)(),int kf) { double *pd,*pc,*pmax,*p,*q,*r,*s,*t; double err,ssq,f,z; int j; pd=(double *)calloc(2*m,sizeof(double)); pc=pd+m; if(kf==0){ for(p=var,pmax=p+m*m; p