/* evmax.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 evmax(double *a,double *u,int n) { double *p,*q,*qm,*r,*s,*t; double ev,evm,c,h; int kc; q=(double *)calloc(n,sizeof(double)); qm=q+n; *(qm-1)=1.; ev=0.; for(kc=0; kc<200 ;++kc){ h=c=0.; evm=ev; for(p=u,r=a,s=q; s