[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gsl] cdf_poisson_P
From: |
Rhys Ulerich |
Subject: |
Re: [Bug-gsl] cdf_poisson_P |
Date: |
Thu, 18 Oct 2012 08:31:57 -0500 |
Hi Georgios,
> Just to clarify: the function I am talking about is gsl_cdf_poisson_P, Not
> gsl_ran_poisson_pdf that I mistakenly mentioned below. The function
> gsl_ran_poisson_pdf (unsigned int k, double mu) is fine, and
> gsl_ran_poisson_pdf(-1,5) returns the expected zero.
According to
http://www.gnu.org/software/gsl/manual/html_node/The-Poisson-Distribution.html
gsl_cdf_poisson_P also takes an unsigned int as the first argument.
Passing negative values to the function is impossible because the
first argument is unsigned.
That "gsl_ran_poisson_pdf(-1,5) returns the expected zero" is mere
happenstance. Somehow feeding the function "(unsigned) -1" ==
4294967295 (according to my current system) is producing the zero.
- Rhys