/// Irregular modified spherical bessel functions. double bessel_kl(unsigned int n, double x) { gsl_sf_result result; int stat = gsl_sf_bessel_kl_scaled_e(n, x, &result); if (stat != GSL_SUCCESS) { std::ostringstream msg("Error in bessel_kl:"); msg << " n=" << n << " x=" << x; throw std::runtime_error(msg.str()); } else return std::exp(-x) * result.val; }
double gsl_sf_bessel_kl_scaled(const int l, const double x) { EVAL_RESULT(gsl_sf_bessel_kl_scaled_e(l, x, &result)); }