34 #include <bias_config.h>
37 #include <Base/Math/Random.hh>
38 #include <MathAlgo/GSL.hh>
46 # include <gsl/gsl_cdf.h>
48 const double x (5.678);
49 const double nu (3.21);
50 const double groundtruth(0.85341575204989784);
51 const double eps (0.0000000000001);
53 double val = gsl_cdf_chisq_P (x, nu);
56 if (fabs(val-groundtruth)>eps){
64 int main(
int ,
char ** )
68 const int deg_freedom = 2;
71 for (
int i=0; i<count; i++){
73 cout << setw(13) << setprecision(3) << x
74 << setw(13) << setprecision(3)
82 #endif // BIAS_HAVE_GSL
double GetUniformDistributed(const double min, const double max)
on succesive calls return uniform distributed random variable between min and max ...
BIASMathAlgo_EXPORT double InvChiSquareCulmProbFun(double x, int deg_freedom)
class for producing random numbers from different distributions