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

Submitted by:  -Deleted Account- <bjg>
Submitted on:  Thu 22 Jan 2009 08:21:13 PM UTC  
 
Category: NoneSeverity: 2 - Minor
Operating System: Status: Fixed
Assigned to: -Deleted Account- <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>In charge of this item.
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>In charge of this item.
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>In charge of this item.
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: -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>In charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 4 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 25 Feb 2010 03:59:42 PM UTCbjgStatusPostponed=>Fixed
  Open/ClosedOpen=>Closed
Fri 17 Jul 2009 07:09:38 PM UTCbjgSeverity3 - Normal=>2 - Minor
  StatusConfirmed=>Postponed

Back to the top


Powered by Savane 3.1-cleanup1