help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] Re: question about dirichlet lnpdf function (potential bu


From: Brian Gough
Subject: Re: [Help-gsl] Re: question about dirichlet lnpdf function (potential bug)
Date: Thu, 16 Jul 2009 20:45:20 +0100
User-agent: Wanderlust/2.14.0 (Africa) Emacs/22.2 Mule/5.0 (SAKAKI)

At Mon, 13 Jul 2009 11:23:32 -0500,
Rodney Sparapani wrote:
>    [6] gsl_sf_lngamma_e(x = ???, result = ???) (optimized), at 
> 0xfee1d178 (line ~1138) in "gamma.c"
>    [7] gsl_sf_lngamma(x = ???) (optimized), at 0xfee1fdf4 (line ~1654) 
> in "gamma.c"
>    [8] gsl_ran_dirichlet_lnpdf(K = ???, alpha = ???, theta = ???) 
> (optimized), at 0xfed9573b (line ~155) in "dirichlet.c"
>    [9] gsl_ran_dirichlet_pdf(K = ???, alpha = ???, theta = ???) 
> (optimized), at 0xfed954dc (line ~133) in "dirichlet.c"
>    [10] main(), line 8 in "dirichlet.c"
> 
> It looks like we have log-gamma-function(0) which is 0.  However,
> it is throwing an error.  Should it not just return 0?

You're right that the GSL function signals an error which is unwanted
here. lngamma(0) is infinity and gsl_sf_lngamma gives an overflow
error, but since the infinity is in the denominator of the final
result there is no need for the error.

-- 
Brian Gough
(GSL Maintainer)

Support freedom by joining the FSF 
http://www.fsf.org/associate/support_freedom/join_fsf?referrer=37




reply via email to

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