about return value from gsl
Posted: Sat Dec 08, 2012 5:47 pm
I want to do some scientific computing with gsl. but encounter some error. below is my code
the complex defined in gsl like this:
and the funciton gsl_complex_rect like this:
thanks .
Code: Select all
> (import LIB "gsl_complex_rect" "void*" "double" "double")
gsl_complex_rect@7FBAD0403FD0
> (unpack "lf lf" (gsl_complex_rect 2.0 3.0))
Segmentation fault (core dumped)
Code: Select all
typedef struct
{
double dat[2];
} gsl_complex;
how can I print the complex returned by gsl_complex_rect?
-- Function: gsl_complex gsl_complex_rect (double X, double Y)
This function uses the rectangular Cartesian components (X,Y) to
return the complex number z = x + i y. An inline version of this
function is used when `HAVE_INLINE' is defined.
thanks .