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 error Severity:  3 - Normal
Operating System:  Status:  None
Assigned to:  None Open/Closed:  Open
Release: 

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,
Kai

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
  • -email is unavailable- added by psa (Submitted the item)
  •  

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.3