[Top][All Lists]

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

[Help-gsl] brent minimization

From: Andrew W. Steiner
Subject: [Help-gsl] brent minimization
Date: Fri, 4 Jan 2008 16:23:02 -0500

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?

Take care,

gsl-1.10:brent.c (beginning at line 184):

    if (u < z)
          *x_lower = u;
          *f_lower = f_u;
          return GSL_SUCCESS;
          *x_upper = u;
          *f_upper = f_u;
          return GSL_SUCCESS;

      if (f_u <= f_w || w == z)
          state->v = w;
          state->f_v = f_w;
          state->w = u;
          state->f_w = f_u;
          return GSL_SUCCESS;
      else if (f_u <= f_v || v == z || v == w)
          state->v = u;
          state->f_v = f_u;
          return GSL_SUCCESS;


reply via email to

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