32 #include <agrum/tools/core/math/chi2.h> 34 #ifndef DOXYGEN_SHOULD_SKIP_THIS 38 # define GUM_Z_MAX 6.0
39 # define GUM_CHI_EPSILON 0.000001
40 # define GUM_CHI_MAX 99999.0
41 # define GUM_LOG_SQRT_PI 42 0.5723649429247000870717135
43 # define GUM_I_SQRT_PI 0.5641895835477562869480795
44 # define GUM_BIGX 20.0
45 # define gum__ex(x) (((x) < -GUM_BIGX
) ? 0.0
: std::exp(x)) 51 # include <agrum/tools/core/math/chi2_inl.h> 80 if (
y >= (GUM_Z_MAX * 0.5))
84 x = ((((((((0.000124818987 *
w - 0.001075204047) *
w + 0.005198775019) *
w 99 x = (((((((((((((-0.000045255659 *
y + 0.000152529290) *
y 128 return (
z > 0.0 ? ((
x + 1.0) * 0.5) : ((1.0 -
x) * 0.5));
137 if ((
x <= 0.0) || (
df < 1))
return (1.0);
143 if (
df > 1)
y = gum__ex(-
a);
148 x = 0.5 * (
df - 1.0);
149 z = (
even ? 1.0 : 0.5);
152 e = (
even ? 0.0 : GUM_LOG_SQRT_PI);
157 s += gum__ex(
c *
z -
a -
e);
186 else if (
proba >= 1.0)
INLINE void emplace(Args &&... args)