diff --git a/ex-1/landau.c b/ex-1/landau.c index bef2c46..1098af3 100644 --- a/ex-1/landau.c +++ b/ex-1/landau.c @@ -32,8 +32,9 @@ double landau_cdf(double x, void* params) { gsl_integration_workspace* w = gsl_integration_workspace_alloc(iter); - // clip values too small - if (x < -200) x = -200; + // clip values too small or large values + if (x < -200) x = -200; + if (x > 100000) x = 100000; // We integrate the pdf in [x, +∞) instead // of (-∞, x] to avoid a singularity and