[Top][All Lists]

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

[Bug-gsl] [bug #25383] use GSL_ENOPROG instead of GSL_CONTINUE in lmiter

From: Brian Gough
Subject: [Bug-gsl] [bug #25383] use GSL_ENOPROG instead of GSL_CONTINUE in lmiterate.c
Date: Thu, 22 Jan 2009 20:21:15 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080925 Fedora/false StumbleUpon/1.73 SeaMonkey/1.1.12


                 Summary: use GSL_ENOPROG instead of GSL_CONTINUE in
                 Project: GNU Scientific Library
            Submitted by: bjg
            Submitted on: Thu 22 Jan 2009 08:21:13 PM GMT
                Category: None
                Severity: 3 - Normal
                  Status: Confirmed
             Assigned to: bjg
             Open/Closed: Open
                 Release: 1.12
         Discussion Lock: Any



[I think we should use GSL_ENOPROG in lmiterate.c although it could break
existing code I guess]

From: "Mark M. Ito" <address@hidden>
To: address@hidden
Subject: [Bug-gsl] non-linear LS fit example in documentation: bug?
Date: Tue, 20 Jan 2009 15:16:26 -0500

Dear GSL folks,

In section 37.9 "Example programs for Nonlinear Least-Squares Fitting" 
in the gsl manual, the main loop says:

           status = gsl_multifit_fdfsolver_iterate (s);
           printf ("status = %s\n", gsl_strerror (status));
           print_state (iter, s);
           if (status)
           status = gsl_multifit_test_delta (s->dx, s->x,
                                             1e-4, 1e-4);
       while (status == GSL_CONTINUE && iter < 500);
       gsl_multifit_covar (s->J, 0.0, covar);

Shouldn't the "if (status) break;" be an "if (status) continue;"? It is 
normal for the solver to return GSL_CONTINUE in which case you want to 
continue to iterate. Break exits the do loop completely, no?

  -- Mark Ito



Reply to this item at:


  Message sent via/by Savannah

reply via email to

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