[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Re: question about dirichlet lnpdf function (potential bu
Re: [Help-gsl] Re: question about dirichlet lnpdf function (potential bug)
Thu, 16 Jul 2009 20:45:20 +0100
Wanderlust/2.14.0 (Africa) Emacs/22.2 Mule/5.0 (SAKAKI)
At Mon, 13 Jul 2009 11:23:32 -0500,
Rodney Sparapani wrote:
>  gsl_sf_lngamma_e(x = ???, result = ???) (optimized), at
> 0xfee1d178 (line ~1138) in "gamma.c"
>  gsl_sf_lngamma(x = ???) (optimized), at 0xfee1fdf4 (line ~1654)
> in "gamma.c"
>  gsl_ran_dirichlet_lnpdf(K = ???, alpha = ???, theta = ???)
> (optimized), at 0xfed9573b (line ~155) in "dirichlet.c"
>  gsl_ran_dirichlet_pdf(K = ???, alpha = ???, theta = ???)
> (optimized), at 0xfed954dc (line ~133) in "dirichlet.c"
>  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.
Support freedom by joining the FSF