/// Normalized incomlete gamma functions. double gamma_p(double a, double x) { gsl_sf_result result; int stat = gsl_sf_gamma_inc_P_e(a, x, &result); if (stat != GSL_SUCCESS) { std::ostringstream msg("Error in gamma_p:"); msg << " a=" << a << " x=" << x; throw std::runtime_error(msg.str()); } else return result.val; }
double gsl_sf_gamma_inc_P(const double a, const double x) { EVAL_RESULT(gsl_sf_gamma_inc_P_e(a, x, &result)); }