|
From: | Peter Johansson |
Subject: | [Bug-gsl] gsl_ran_poisson_pdf with mu=0 |
Date: | Thu, 18 Feb 2016 15:19:29 +1000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
Hi,I noticed that gsl_ran_poisson_pdf(k, mu) error out if mu=0.0. IMHO a Poisson distribution with zero mean is a perfectly valid distribition (although it is not very random), so I find it unexpected that the function doesn't support it. I suggest to add some code taking care of the special case. Something like:
if (!mu) { if (k) return 0.0 return 1.0 } Cheers, Peter * *
[Prev in Thread] | Current Thread | [Next in Thread] |