[Top][All Lists]

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

[Bug-gsl] gsl_cdf_chisq_Q

From: Jorge Zuluaga
Subject: [Bug-gsl] gsl_cdf_chisq_Q
Date: Wed, 28 Jul 2004 10:55:56 -0500 (COT)

This message is to report a bug in the
cummulative-distribution-function computation of the chi-square
distribution (routine gsl_cdf_chisq_Q).

I am using gsl-1.5 and in several opprtunities when I had tried to use
the library routine 'gsl_cdf_chisq_Q' with moderately large values of
nu (degrees-of-freedom) and chi-square, i.e. nu > 50 and
chi-square>nu, the routine returns 'nan'.  In order to test the origin
of the problem I wrote a routine to integrate out through
gsl_integration_qagiu the chisq. pdf function gsl_ran_chisq_pdf and
obtained the same result.

I think that the error arises from the fact that for large nu the
chi-square routine behaves improperly (large numbers exponentiated to
large numbers) and then the integration produces the before mentioned

I wrote a routine where the chi-square pdf is computed first
calculating the logarithm of the function and then exponentiating the
result.  With this change, the cdf computed using
gsl_integration_qagiu behaves properly for any value of nu and

Jorge Zuluaga                           |
Instituto de Fisica                     |
Universidad de Antioquia                |       
Tels. +57-4-2105635/38/30               |
address@hidden          |
http://naima.udea.edu.co/jzuluaga       |

reply via email to

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