28#include <gsl/gsl_combination.h>
29#include <gsl/gsl_randist.h>
30#include <gsl/gsl_rng.h>
31#include <gsl/gsl_sf.h>
36#define BESSEL_K_THRES 1.0e2
41double FC_FUNC_(oct_incomplete_gamma, OCT_INCOMPLETE_GAMMA)(
const double *a,
43 return gsl_sf_gamma_inc_Q(*a, *x);
49 return gsl_sf_bessel_j0(*x);
51 return gsl_sf_bessel_j1(*x);
53 return gsl_sf_bessel_j2(*x);
55 return gsl_sf_bessel_jl(*
l, *x);
59double FC_FUNC_(oct_bessel, OCT_BESSEL)(
const fint *n,
const double *x) {
60 return gsl_sf_bessel_Jn(*n, *x);
63double FC_FUNC_(oct_bessel_in, OCT_BESSEL_IN)(
const fint *n,
const double *x) {
64 return gsl_sf_bessel_In(*n, *x);
67double FC_FUNC_(oct_bessel_j0, OCT_BESSEL_J0)(
const double *x) {
68 return gsl_sf_bessel_J0(*x);
71double FC_FUNC_(oct_bessel_j1, OCT_BESSEL_J1)(
const double *x) {
72 return gsl_sf_bessel_J1(*x);
76double FC_FUNC_(oct_bessel_k0, OCT_BESSEL_K0)(
const double *x) {
77 if (*x > BESSEL_K_THRES) {
80 return gsl_sf_bessel_K0(*x);
84double FC_FUNC_(oct_bessel_k1, OCT_BESSEL_K1)(
const double *x) {
85 if (*x > BESSEL_K_THRES) {
88 return gsl_sf_bessel_K1(*x);
95 return gsl_sf_legendre_sphPlm(*
l, *m, *x);
99double FC_FUNC_(oct_sf_laguerre_n, OCT_SF_LAGUERRE_N)(
const int *n,
102 return gsl_sf_laguerre_n(*n, *a, *x);
107void FC_FUNC_(oct_combination_init, OCT_COMBINATION_INIT)(gsl_combination **c,
110 *c = gsl_combination_calloc(*n, *k);
113void FC_FUNC_(oct_combination_next, OCT_COMBINATION_NEXT)(gsl_combination **c,
115 *next = gsl_combination_next(((gsl_combination *)(*c)));
118void FC_FUNC_(oct_get_combination, OCT_GET_COMBINATION)(gsl_combination **c,
121 for (
i = 0;
i < ((gsl_combination *)(*c))->k;
i++) {
122 comb[
i] = (
fint)((gsl_combination *)(*c))->data[
i];
126void FC_FUNC_(oct_combination_end, OCT_COMBINATION_END)(gsl_combination **c) {
127 gsl_combination_free(((gsl_combination *)(*c)));
131void FC_FUNC_(oct_ran_init, OCT_RAN_INIT)(gsl_rng **r) {
133 *r = gsl_rng_alloc(gsl_rng_default);
136void FC_FUNC_(oct_ran_end, OCT_RAN_END)(gsl_rng **r) { gsl_rng_free(*r); }
139double FC_FUNC_(oct_ran_gaussian, OCT_RAN_GAUSSIAN)(
const gsl_rng **r,
140 const double *
sigma) {
141 return gsl_ran_gaussian(*r, *
sigma);
144double FC_FUNC_(oct_ran_flat, OCT_RAN_FLAT)(
const gsl_rng **r,
const double *a,
146 return gsl_ran_flat(*r, *a, *b);
151 c = gsl_strerror(*err);
real(real64), dimension(:,:), allocatable sigma
S_E matrix.
double FC_FUNC_(oct_incomplete_gamma, OCT_INCOMPLETE_GAMMA) const
void oct_strerror(const fint *err, char *res)