OK, that makes sense. Thanks!

Personally, however, I do not see a reason why the first argument must be unsigned int, as opposed to int. The reason why I say that is that the Poisson distribution is a distribution that gives positive probability to non negative integers and zero to the negative ones. So for negative int the 2 functions should return zero. That is just my opinion though.

Thanks again!

On 18/10/12 14:31, Rhys Ulerich wrote:
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


Reply via email to