/* tfitval.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.) * ------------------------------------------------------------------------ */ /* Test: fitval setfval Variance matrix array for 3-parameter test function 'frat'. */ double v[]={1.2e-2,2.1e-3,4.0e-3,2.1e-3,5.3e-3, 9.0e-4,4.0e-3,9.0e-4,8.5e-3}; /* Test function 'frat' used in variance analysis test. */ double frat(double x,double *p) { return p[0]*x/(p[1]+p[2]*x*x); } #include "ccmath.h" void main(void) { double par[3],f,s,x,dx; int i,n,m; printf(" Test of Fit-Confidence Bound\n"); m=3; par[0]=2.; par[1]=1.; par[2]=.5; setfval(0,m); x=0.2; dx=.2; n=20; printf(" x value sigma\n"); for(i=0; i