ex-1: handle too large values in landau_cdf
This commit is contained in:
parent
1d7e88d7cb
commit
01060d2344
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user