bugGNU Scientific Library - Bugs: bug #43326, Bug in gsl_ran_poisson_pdf() for...


You are not allowed to post comments on this tracker with your current authentication level.

bug #43326: Bug in gsl_ran_poisson_pdf() for mu = 0.0

Submitted by:  Patrick Alken <psa>
Submitted on:  Mon 29 Sep 2014 05:42:30 PM UTC  
Category: Runtime errorSeverity: 3 - Normal
Operating System: Status: None
Assigned to: NoneOpen/Closed: Open

Mon 29 Sep 2014 05:42:30 PM UTC, original submission:

From kai =dot= wassmuss =at= gmx =dot= de

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,

Patrick Alken <psa>
Project Administrator


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by psa (Submitted the item)

    Please enter the title of George Orwell's famous dystopian book (it's a date):



    No Changes Have Been Made to This Item

    Back to the top

    Powered by Savane 3.1-cleanup1