55 static double cof[6]={76.18009173,-86.50532033,24.01409822,
56 -1.231739516,0.120858003e-2,-0.536382e-5};
60 tmp -= (x+0.5)*
log(tmp);
67 return -tmp+
log(2.50662827465*ser);
83 cerr <<
"Incompatible array bounds in function "
84 "dvector log_comb(const dvector& n, const dvector& r)" <<
endl;
88 for (
int i=mmin;i<=mmax;i++)
106 for (
int i=mmin;i<=mmax;i++)
124 for (
int i=mmin;i<=mmax;i++)
142 for (
int i=mmin;i<=mmax;i++)
double factln(double n)
Log-factorial .
double log_comb(double n, double k)
Log of the binomial coefficent; i.e log of 'n choose k'.
double gammln(double xx)
Log gamma function.
Vector of double precision numbers.
int indexmin() const
Get minimum valid index.
prnstream & endl(prnstream &)
int indexmax() const
Get maximum valid index.
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.