At Fri, 4 Jan 2008 16:23:02 -0500,
Andrew W. Steiner wrote:
> 
> I probably have a case of the stupids today...but just in case I don't,
> here's a question. There seems to be a whole section of
> unreachable code in brent.c (see below)
> since the first if-else construct always returns, so the next if-else
> construct is never executed. Is this intentional?
> 

This is now fixed in CVS, thanks for the bug report!

-- 
Brian Gough

--- a/min/brent.c
+++ b/min/brent.c
@@ -185,13 +185,11 @@ brent_iterate (void *vstate, gsl_function * f, double 
*x_minimum, double * f_min
         {
           *x_lower = u;
           *f_lower = f_u;
-          return GSL_SUCCESS;
         }
       else
         {
           *x_upper = u;
           *f_upper = f_u;
-          return GSL_SUCCESS;
         }
 
       if (f_u <= f_w || w == z)
@@ -210,7 +208,7 @@ brent_iterate (void *vstate, gsl_function * f, double 
*x_minimum, double * f_min
         }
     }
 
-  return GSL_FAILURE;
+  return GSL_SUCCESS;
 }
 
 


_______________________________________________
Help-gsl mailing list
Help-gsl@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to