35 "log2(gamma()) should be called with a positive argument");
40 Idx index = int(x * 100);
43 *
double(x * 100 - index);
45 Idx index = int(x * 100 + 0.5);
51 return (
__log_sqrt_2pi + (x - 0.5f) * log(x) - x + log(1.0 + 1.0 / (12 * x)))
double gammaLog2(double x) const
Returns log2 ( gamma (x) ) for x >= 0.
void setPrecision(bool p)
Sets whether we need more precision for small values.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
static constexpr double __log_sqrt_2pi
The value of std::log ( std::sqrt(2pi) ).
bool __requires_precision
Indicates whether we need more precision for small values.
double operator()(double x) const
Returns log2 ( gamma (x) ) for x > 0.
Size Idx
Type for indexes.
static const std::vector< double > __small_values
The 5000 values from 0 to 50 by step of 1/100.
#define GUM_ERROR(type, msg)
static constexpr double __1log2
The value of 1 / std::log(2).