Annotation of OpenXM/src/ox_gsl/call_gsl.c, Revision 1.2
1.2 ! takayama 1: /* $OpenXM$
! 2: */
1.1 takayama 3: //#include <gsl/gsl_types.h>
4: //#include <gsl/gsl_sys.h>
1.2 ! takayama 5: #include <unistd.h>
1.1 takayama 6: #include <gsl/gsl_sf_result.h>
1.2 ! takayama 7: #include <gsl/gsl_errno.h>
1.1 takayama 8: #include <gsl/gsl_sf_gamma.h>
9: #include "ox_gsl.h"
10: extern int Debug;
1.2 ! takayama 11: // local prototype declarations
! 12:
1.1 takayama 13: void call_gsl_sf_lngamma_complex_e() {
14: cmo *c;
15: double zr;
16: double zi;
17: gsl_sf_result lnr;
18: gsl_sf_result arg;
19: int status;
20: cmo *r[3];
21: cmo *ans;
1.2 ! takayama 22: // gsl_set_error_handler_off();
! 23: gsl_set_error_handler((gsl_error_handler_t *)myhandler);
1.1 takayama 24: c = pop(); // number of args
25: zr=get_double();
26: zi=get_double();
27: if (Debug) printf("gsl_sf_lngamma_complex_e(zr=%lg,zi=%lg)\n",zr,zi);
28: status = gsl_sf_lngamma_complex_e(zr,zi,&lnr,&arg);
29: r[0] = (cmo *)new_cmo_double(lnr.val);
30: r[1] = (cmo *)new_cmo_double(arg.val);
31: r[2] = (cmo *)new_cmo_int32(status);
1.2 ! takayama 32: ans = (cmo *)new_cmo_list_array((void *)r,3);
1.1 takayama 33: push(ans);
34: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>