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) |
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"); |
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"); |
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); |
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 |
} |
} |