ex-1: handle too large values in landau_cdf

This commit is contained in:
Michele Guerini Rocco 2020-04-08 13:42:25 +00:00
parent 1d7e88d7cb
commit 01060d2344

View File

@ -32,8 +32,9 @@ double landau_cdf(double x, void* params) {
gsl_integration_workspace* w =
gsl_integration_workspace_alloc(iter);
// clip values too small
// 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