static VALUE rb_gsl_sf_gegenpoly_n_e(VALUE obj, VALUE n, VALUE lambda, VALUE x) { gsl_sf_result *rslt = NULL; VALUE v; // local variable "status" declared and set, but never used //int status; CHECK_FIXNUM(n); Need_Float(lambda); Need_Float(x); v = Data_Make_Struct(cgsl_sf_result, gsl_sf_result, 0, free, rslt); /*status =*/ gsl_sf_gegenpoly_n_e(FIX2INT(n), NUM2DBL(lambda), NUM2DBL(x), rslt); return v; }
/// Gegenbauer polynomials. double gegenpoly_n(unsigned int n, double lambda, double x) { gsl_sf_result result; int stat = gsl_sf_gegenpoly_n_e(n, lambda, x, &result); if (stat != GSL_SUCCESS) { std::ostringstream msg("Error in gegenpoly_n:"); msg << " n=" << n << " lambda=" << lambda << " x=" << x; throw std::runtime_error(msg.str()); } else return result.val; }