bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gsl] Erroneous values from gsl_ran_chisq_pdf


From: Teemu Ikonen
Subject: [Bug-gsl] Erroneous values from gsl_ran_chisq_pdf
Date: Wed, 10 Nov 2010 14:37:33 +0100

Hello,

The current implementation of the chi-squared distribution pdf in GSL
returns 0.0 for inputs with x<=0.0.

The domain of this function is [0.0, inf), (see e.g. Abramovitz-Stegun
here: http://people.math.sfu.ca/~cbm/aands/page_940.htm ),
so wrong values at x=0.0 are returned for nu=1.0
(gsl_ran_chisq_pdf(0.0, 1.0) should be inf) and nu=2.0 (should be
0.5).

Attached is a patch which fixes this.

Best,

Teemu

Attachment: gsl.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]