Skip to content

Commit 9d4a45a

Browse files
committed
Changed how the scale density of Einasto parameters is calculated. It now uses the complementary inc Gamma function instead of a difference between the gamma function and the upper incomplete gamma function.
1 parent cd73751 commit 9d4a45a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/C_xi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ double rhos_einasto_at_M(double Mass, double conc, double alpha, int delta,
6363
double rs = rdelta/conc; //Scale radius in Mpc/h
6464
double x = 2./alpha * pow(conc, alpha); //pow(rdelta/rs, alpha);
6565
double a = 3./alpha;
66-
double gam = gsl_sf_gamma(a) - gsl_sf_gamma_inc(a, x);
66+
double gam = gsl_sf_gamma(a) * gsl_sf_gamma_inc_P(a, x);
6767
double num = delta * rhom * rdelta*rdelta*rdelta * alpha * pow(2./alpha, a);
6868
double den = 3. * rs*rs*rs * gam;
6969
return num/den;

0 commit comments

Comments
 (0)