/* gnlsq.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 double gnlsq(double *x,double *y,int n,double *par,double *var,int m, double de,double (*func)()) { double *cp,*dp,*p,*q,*r,*s,*t; double err,f,z,ssq; int j,k,psinv(); cp=(double *)calloc(2*m,sizeof(double)); dp=cp+m; for(p=var,q=var+m*m; p