Disable "hard" examples in CI
[qpms.git] / oldtests / gsl-intgamma / incgamma.c
blob155ff81a96921f75e50644163977535f02ade549
1 #include <gsl/gsl_sf_gamma.h>
2 #include <gsl/gsl_sf_result.h>
3 #include <qpms/ewald.h>
4 #include <stdio.h>
5 #include <math.h>
6 #include <complex.h>
7 //#include <gsl/gsl_integration.h>
8 #include <gsl/gsl_errno.h>
11 int main(int argc, char **argv) {
12 gsl_error_handler_t * old_handler=gsl_set_error_handler_off();
13 int j;
14 double x;
15 while (scanf("%d %lf", &j, &x) == 2) {
16 printf("%d %.16g", j, x);
17 qpms_csf_result res;
18 complex double argfac = 1;
19 for (int i = 0; i < 4; ++i, argfac *= I) {
20 int retval = complex_gamma_inc_e(0.5-j, argfac * x, &res);
21 printf(" | %.16g+%.16gj %.4g %d", creal(res.val), cimag(res.val), res.err, retval);
23 putchar('\n');
25 return 0;