|
From: | Kai Waßmuß |
Subject: | [Bug-gsl] Bug in gsl_ran_poisson_pdf() for mu = 0.0 |
Date: | Fri, 19 Sep 2014 16:43:19 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.0 |
Dear GSL maintainers, gsl_ran_poisson_pdf() uses a clever method to evaluate the poisson pmf p(n) = (mu^n / n!) exp(-mu) without evaluating the factorial directly.To do so, it evaluates log(mu). In the special case mu = 0 this returns -nan and so gsl_ran_poisson_pdf() returns -nan.
mu = 0 corresponds to a poisson process with rate 0 and the return value of gsl_ran_poisson_pdf(k, mu) should consequently be 1.0 for k=0 and 0.0 for k>0.
This bug is similar to https://savannah.gnu.org/bugs/?func=detailitem&item_id=36328, which was accepted for octave.
Best regards, Kai
[Prev in Thread] | Current Thread | [Next in Thread] |