16 #define PI 3.14159265358979323846264338328
20 #include "gsl/gsl_sf_bessel.h"
21 #include "gsl/gsl_sf_legendre.h"
22 #include "gsl/gsl_sf_laguerre.h"
23 #include "gsl/gsl_sf_hyperg.h"
24 #include "gsl/gsl_sf_ellint.h"
26 #include "gsl/gsl_sf_expint.h"
27 #include "gsl/gsl_sf_zeta.h"
28 #include "gsl/gsl_sf_airy.h"
29 #include "gsl/gsl_sf_coupling.h"
41 double assoc_laguerre(
unsigned n,
double m,
double x) {
43 return gsl_sf_laguerre_n(n, m, x);
52 double assoc_legendre(
unsigned l,
unsigned m,
double x) {
54 return (m%2 == 0) ? gsl_sf_legendre_Plm(l, m, x) : -gsl_sf_legendre_Plm(l, m, x);
60 double legendre(
unsigned l,
unsigned m,
double x) {
61 return gsl_sf_legendre_Plm(l, m, x);
69 double comp_ellint_1(
double k) {
71 return gsl_sf_ellint_Kcomp(k, GSL_PREC_DOUBLE);
80 double comp_ellint_2(
double k) {
82 return gsl_sf_ellint_Ecomp(k, GSL_PREC_DOUBLE);
132 double comp_ellint_3(
double n,
double k) {
134 return gsl_sf_ellint_P(PI/2.0, k, -n, GSL_PREC_DOUBLE);
143 double conf_hyperg(
double a,
double b,
double z) {
145 return gsl_sf_hyperg_1F1(a, b, z);
151 double conf_hypergU(
double a,
double b,
double z) {
153 return gsl_sf_hyperg_U(a, b, z);
162 double cyl_bessel_i(
double nu,
double x) {
164 return gsl_sf_bessel_Inu(nu, x);
173 double cyl_bessel_j(
double nu,
double x) {
175 return gsl_sf_bessel_Jnu(nu, x);
184 double cyl_bessel_k(
double nu,
double x) {
186 return gsl_sf_bessel_Knu(nu, x);
196 double cyl_neumann(
double nu,
double x) {
198 return gsl_sf_bessel_Ynu(nu, x);
208 double ellint_1(
double k,
double phi) {
210 return gsl_sf_ellint_F(phi, k, GSL_PREC_DOUBLE);
220 double ellint_2(
double k,
double phi) {
222 return gsl_sf_ellint_E(phi, k, GSL_PREC_DOUBLE);
274 double ellint_3(
double n,
double k,
double phi) {
276 return gsl_sf_ellint_P(phi, k, -n, GSL_PREC_DOUBLE);
285 double expint(
double x) {
287 return gsl_sf_expint_Ei(x);
294 double expint_n(
int n,
double x) {
296 return gsl_sf_expint_En(n, x);
314 double hyperg(
double a,
double b,
double c,
double x) {
316 return gsl_sf_hyperg_2F1(a, b, c, x);
325 double laguerre(
unsigned n,
double x) {
326 return gsl_sf_laguerre_n(n, 0, x);
335 double legendre(
unsigned l,
double x) {
337 return gsl_sf_legendre_Pl(l, x);
346 double riemann_zeta(
double x) {
348 return gsl_sf_zeta(x);
357 double sph_bessel(
unsigned n,
double x) {
359 return gsl_sf_bessel_jl(n, x);
368 double sph_legendre(
unsigned l,
unsigned m,
double theta) {
370 return gsl_sf_legendre_sphPlm(l, m, std::cos(theta));
380 double sph_neumann(
unsigned n,
double x) {
382 return gsl_sf_bessel_yl(n, x);
388 double airy_Ai(
double x) {
390 return gsl_sf_airy_Ai(x, GSL_PREC_DOUBLE);
396 double airy_Bi(
double x) {
398 return gsl_sf_airy_Bi(x, GSL_PREC_DOUBLE);
404 double airy_Ai_deriv(
double x) {
406 return gsl_sf_airy_Ai_deriv(x, GSL_PREC_DOUBLE);
412 double airy_Bi_deriv(
double x) {
414 return gsl_sf_airy_Bi_deriv(x, GSL_PREC_DOUBLE);
420 double airy_zero_Ai(
unsigned int s) {
422 return gsl_sf_airy_zero_Ai(s);
428 double airy_zero_Bi(
unsigned int s) {
430 return gsl_sf_airy_zero_Bi(s);
436 double airy_zero_Ai_deriv(
unsigned int s) {
438 return gsl_sf_airy_zero_Ai_deriv(s);
444 double airy_zero_Bi_deriv(
unsigned int s) {
446 return gsl_sf_airy_zero_Bi_deriv(s);
452 double wigner_3j(
int ja,
int jb,
int jc,
int ma,
int mb,
int mc) {
453 return gsl_sf_coupling_3j(ja,jb,jc,ma,mb,mc);
456 double wigner_6j(
int ja,
int jb,
int jc,
int jd,
int je,
int jf) {
457 return gsl_sf_coupling_6j(ja,jb,jc,jd,je,jf);
460 double wigner_9j(
int ja,
int jb,
int jc,
int jd,
int je,
int jf,
int jg,
int jh,
int ji) {
461 return gsl_sf_coupling_9j(ja,jb,jc,jd,je,jf,jg,jh,ji);