bugGNU Scientific Library - Bugs: bug #25383, use GSL_ENOPROG instead of...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #25383: use GSL_ENOPROG instead of GSL_CONTINUE in lmiterate.c

Submitter:  -Deleted Account- <bjg>
Submitted:  Thu 22 Jan 2009 08:21:13 PM UTC
   
 
Category:  None Severity:  2 - Minor
Operating System:  Status:  Fixed
Assigned to:  bjg Open/Closed:  Closed
Release:  1.12

Thu 25 Feb 2010 03:59:42 PM UTC, comment #3: 

fixed by commit be1b26314778154a4f17d04ff44d380a5404dc85

-Deleted Account- <bjg>
Fri 18 Dec 2009 09:42:34 PM UTC, comment #2: 

The example doc/examples/nlfit.c is affected and needs to handle GSL_CONTINUE as a special case if the behavior is not changed.

-Deleted Account- <bjg>
Tue 07 Jul 2009 08:23:15 PM UTC, comment #1: 

This has been documented in the manual. Will change in a future release (1.14)

-Deleted Account- <bjg>
Thu 22 Jan 2009 08:21:13 PM UTC, original submission:  

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

From: "Mark M. Ito" <marki@jlab.org>
To: -email is unavailable-
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


______________________________

-Deleted Account- <bjg>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2010-02-25 bjg StatusPostponed Fixed
    Open/ClosedOpen Closed
2009-07-17 bjg Severity3 - Normal 2 - Minor
    StatusConfirmed Postponed

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code