1 #include <gsl/gsl_sf_gamma.h>
2 #include <gsl/gsl_sf_result.h>
3 #include <qpms/ewald.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();
15 while (scanf("%d %lf", &j
, &x
) == 2) {
16 printf("%d %.16g", j
, x
);
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
);