bug-gsl
[Top][All Lists]
Advanced

[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: Brian Gough
Subject: [Bug-gsl] [bug #31854] A divide by zero in the gsl_ran_gamma_knuth()
Date: Wed, 15 Dec 2010 20:37:04 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.11) Gecko/2009061118 Fedora/3.0.11-1.fc9 Firefox/3.0.11

Update of bug #31854 (project gsl):

                  Status:               Confirmed => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #2:

This is now fixed in r4706.  Thanks for the bug report!

=== modified file 'randist/gamma.c'
--- randist/gamma.c     2008-11-30 09:00:46 +0000
+++ randist/gamma.c     2010-12-14 21:53:37 +0000
@@ -120,6 +120,11 @@
      on page 551.  */
 
   double p, q, x, u, v;
+
+  if (a == 0) {
+    return 0;
+  }
+
   p = M_E / (a + M_E);
   do
     {


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31854>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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