/[gsl]/gsl/cdf/testgen.c
ViewVC logotype

Diff of /gsl/cdf/testgen.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.2.1 by bjg, Mon Jul 21 16:15:10 2003 UTC revision 1.1.2.2 by bjg, Mon Jul 21 16:51:21 2003 UTC
# Line 7  Line 7 
7  #include "testint.c"  #include "testint.c"
8    
9  gsl_integration_workspace *w;  gsl_integration_workspace *w;
10    int inverse;
11    
12    
13  double  double
14  cauchy (double x, void *p)  cauchy (double x, void *p)
# Line 181  test (gsl_function * f, double x[], int Line 183  test (gsl_function * f, double x[], int
183          continue;          continue;
184    
185        printf (fmt, "_P", x[i], sum);        printf (fmt, "_P", x[i], sum);
186    
187          if (inverse && sum * 1e-5 < GSL_FN_EVAL(f,x[i]) * fabs(x[i]))
188            printf (fmt, "_Pinv", sum, x[i]);
189      }      }
190    
191    printf("\n");    printf("\n");
# Line 215  test (gsl_function * f, double x[], int Line 220  test (gsl_function * f, double x[], int
220          }          }
221    
222        printf (fmt, "_Q", x[i], sum);        printf (fmt, "_Q", x[i], sum);
223    
224          if (inverse && sum < GSL_FN_EVAL(f,x[i]) * fabs(x[i]))
225            printf (fmt, "_Qinv", sum, x[i]);
226      }      }
227        
228    printf("\n");    printf("\n");
# Line 260  main (void) Line 268  main (void)
268    
269  #define TEST2(name,p1,p2,range,n) { double p[] = { p1,p2 } ; gsl_function f = {&name, p}; test(&f, range, n, "TEST(gsl_cdf_" #name "%s, (%.18g," #p1 "," #p2 "), %.12e, TEST_TOL6);\n"); }  #define TEST2(name,p1,p2,range,n) { double p[] = { p1,p2 } ; gsl_function f = {&name, p}; test(&f, range, n, "TEST(gsl_cdf_" #name "%s, (%.18g," #p1 "," #p2 "), %.12e, TEST_TOL6);\n"); }
270    
271    
272      inverse = 0;
273      TEST2(beta, 1.3, 2.7, x01, N01);
274      TEST2(fdist, 5.3, 2.7, xpos, Npos);
275    
276      inverse = 1;
277    TEST(cauchy, 1.3, xall, N);    TEST(cauchy, 1.3, xall, N);
278    TEST(gaussian, 1.3, xall, N);    TEST(gaussian, 1.3, xall, N);
279    TEST(laplace, 1.3, xall, N);    TEST(laplace, 1.3, xall, N);
# Line 270  main (void) Line 284  main (void)
284    TEST2(gamma, 1.3,2.7, xpos, Npos);    TEST2(gamma, 1.3,2.7, xpos, Npos);
285    
286    TEST(chisq, 1.3, xpos, Npos);    TEST(chisq, 1.3, xpos, Npos);
   TEST2(fdist, 5.3, 2.7, xpos, Npos);  
     
287    TEST(tdist, 1.3, xall, N);    TEST(tdist, 1.3, xall, N);
288    
   TEST2(beta, 1.3, 2.7, x01, N01);  
289    TEST2(gumbel1, 1.3, 2.7, xall, N);    TEST2(gumbel1, 1.3, 2.7, xall, N);
290    TEST2(gumbel2, 1.3, 2.7, xpos, Npos);    TEST2(gumbel2, 1.3, 2.7, xpos, Npos);
291    TEST2(weibull, 1.3, 2.7, xpos, Npos);    TEST2(weibull, 1.3, 2.7, xpos, Npos);
292    
293    TEST2(pareto, 1.3, 2.7, xpos, Npos);    TEST2(pareto, 1.3, 2.7, xpos, Npos);
294    TEST(logistic, 1.3, xall, N);    TEST(logistic, 1.3, xall, N);
295    
296  }  }

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26