/* solv.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 general * public license. ( See the gpl.license file for details.) * ------------------------------------------------------------------------ */ #include #include int solv(double *a,double *b,int n) { int i,j,k,lc; double *ps,*p,*q,*pa,*pd; double *q0,s,t,tq=0.,zr=1.e-15; q0=(double *)calloc(n,sizeof(double)); for(j=0,pa=a,pd=a; js){ s=t; lc=k;} } tq=tq>s?tq:s; if(s=0 ;--j,pd-=n+1){ for(k=j+1,p=pd,q=b+j,t=0.; k