[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] [bug #31854] A divide by zero in the gsl_ran_gamma_knuth()
From: |
Myoung-serp. Shin. |
Subject: |
[Bug-gsl] [bug #31854] A divide by zero in the gsl_ran_gamma_knuth() |
Date: |
Sun, 12 Dec 2010 16:47:09 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 Safari/534.10 |
URL:
<http://savannah.gnu.org/bugs/?31854>
Summary: A divide by zero in the gsl_ran_gamma_knuth()
Project: GNU Scientific Library
Submitted by: relent95
Submitted on: Sun Dec 12 16:47:09 2010
Category: Runtime error
Severity: 3 - Normal
Operating System:
Status: None
Assigned to: None
Open/Closed: Open
Release: 1.14
Discussion Lock: Any
_______________________________________________________
Details:
The following lines of the randist/gamma.c calls gamma_frac(r, 0) if a is an
integer.
double
gsl_ran_gamma_knuth (const gsl_rng * r, const double a, const double b)
...
if(a >= UINT_MAX)
{
return b * (gamma_large (r, floor (a)) + gamma_frac (r, a - floor
(a)));
}
...
And as the following, the argument a of the gamma_frac() shouldn't be zero.
static double
gamma_frac (const gsl_rng * r, const double a)
{
...
x = exp ((1 / a) * log (v));
...
}
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31854>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Bug-gsl] [bug #31854] A divide by zero in the gsl_ran_gamma_knuth(),
Myoung-serp. Shin. <=