URL:
  <http://savannah.gnu.org/bugs/?25383>

                 Summary: use GSL_ENOPROG instead of GSL_CONTINUE in
lmiterate.c
                 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

    _______________________________________________________

Details:

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

From: "Mark M. Ito" <[email protected]>
To: [email protected]
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:

       do
         {
           iter++;
           status = gsl_multifit_fdfsolver_iterate (s);
     
           printf ("status = %s\n", gsl_strerror (status));
     
           print_state (iter, s);
     
           if (status)
             break;
     
           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:

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

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



_______________________________________________
Bug-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gsl

Reply via email to