1 // c99 -I ../.. ewald2F2.c ../../qpms/ewaldsf.c -lm -lgsl -lblas
2 #include <gsl/gsl_sf_result.h>
3 #include <qpms/ewald.h>
6 #include <gsl/gsl_errno.h>
9 int main(int argc
, char **argv
) {
10 gsl_error_handler_t
* old_handler
=gsl_set_error_handler_off();
12 while (scanf("%lf %lf %lf %lf %lf", &a
, &b
, &c
, &d
, &x
) == 5) {
13 printf("%.16g %.16g %.16g %.16g %.16g", a
, b
, c
, d
, x
);
15 int retval
= hyperg_2F2_series(a
, b
, c
, d
, x
, &res
);
16 printf(" | %.16g (%.3g) %d\n", res
.val
, res
.err
, retval
);