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 0.5723649429247000870717135
42 # define GUM_I_SQRT_PI 0.5641895835477562869480795
43 # define GUM_BIGX 20.0
44 # define _gum_ex(x) (((x) < -GUM_BIGX
) ? 0.0
: std::exp(x)) 50 # include <agrum/tools/core/math/chi2_inl.h> 77 if (
y >= (GUM_Z_MAX * 0.5))
81 x = ((((((((0.000124818987 *
w - 0.001075204047) *
w + 0.005198775019) *
w - 0.019198292004)
95 x = (((((((((((((-0.000045255659 *
y + 0.000152529290) *
y - 0.000019538132) *
y 122 return (
z > 0.0 ? ((
x + 1.0) * 0.5) : ((1.0 -
x) * 0.5));
131 if ((
x <= 0.0) || (
df < 1))
return (1.0);
137 if (
df > 1)
y = _gum_ex(-
a);
142 x = 0.5 * (
df - 1.0);
143 z = (
even ? 1.0 : 0.5);
146 e = (
even ? 0.0 : GUM_LOG_SQRT_PI);
151 s += _gum_ex(
c *
z -
a -
e);
180 else if (
proba >= 1.0)
INLINE void emplace(Args &&... args)