Ejemplo n.º 1
0
static VALUE rb_gsl_sf_complex_dilog_e(VALUE obj, VALUE r, VALUE theta)
{
  gsl_sf_result *re, *im;
  VALUE vre, vim;
  // local variable "status" declared and set, but never used
  //int status;
  Need_Float(r); Need_Float(theta);
  vre = Data_Make_Struct(cgsl_sf_result, gsl_sf_result, 0, free, re);
  vim = Data_Make_Struct(cgsl_sf_result, gsl_sf_result, 0, free, im);
  /*status =*/ gsl_sf_complex_dilog_e(NUM2DBL(r), NUM2DBL(theta), re, im);
  return rb_ary_new3(2, vre, vim);
}
Ejemplo n.º 2
0
CAMLprim value ml_gsl_sf_complex_dilog_e(value r, value theta)
{
  gsl_sf_result re,im;
  gsl_sf_complex_dilog_e(Double_val(r), Double_val(theta), &re, &im);
  return val_of_result_pair (&re, &im);
}