PreviousIndexLast

[bug-gsl] Re: bugs in gsl_cdf_hypergeometric_P/gsl_cdf_hypergeometric_Q (2008-02-12)

From: Brian Gough <bjg@network-theory.co.uk>
Subject: Re: bugs in gsl_cdf_hypergeometric_P/gsl_cdf_hypergeometric_Q
Date: Tue, 12 Feb 2008 14:03:12 +0000
To: Stijn van Dongen <svd@............>
Cc: bug-gsl@gnu.org

At Sat, 9 Feb 2008 13:57:55 +0000,
Stijn van Dongen wrote:
> I believe there is a bug in the functions gsl_cdf_hypergeometric_P and
> gsl_cdf_hypergeometric_Q in gsl-1.10 when computing the midpoint. This can
> result in severely wrong probabilities (as a result of computing the
> non-optimal tail), including negative probabilities. A demonstration program
> is included below.

Thanks, I have fixed this in the source
http://git.savannah.gnu.org/gitweb/?p=gsl.git;a=commit;h=9d103b66938e07a9a29502f13205e142c8b4d787

> On a side note, is there any knowledge/documentation available on the range
> of parameters for which these functions are supposed to give good/reasonable
> precision?

No not really. Since they use unsigned int, they overflow at 2^32 so
they should be safe for parameters <2^16 when there is a multiplication.

--
Brian Gough

Network Theory Ltd,
Publishing Free Software Manuals --- http://www.network-theory.co.uk/