bugGNU Scientific Library - Bugs: bug #45053, gsl_min_find_bracket is most...

 
 

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

bug #45053: gsl_min_find_bracket is most likely incorrectly implemented

Submitter:  Chris Mansley <cmansley>
Submitted:  Thu 07 May 2015 11:26:20 PM UTC
   
 
Category:  Runtime error Severity:  3 - Normal
Priority:  5 - Normal Operating System:  ubuntu 12.04 (kernel 3.8.0-44-generic)
Status:  None Assigned to:  None
Open/Closed:  Open Release:  1.15

Discussion

Sat 15 Mar 2025 11:29:41 PM UTC, comment #1: 

This patch leads to test failures in multifit in the `make check` step and being the only patch applied:

$ ./multifit/test
FAIL: shaw gcv: n=20 p=20 lambda (4.03591521859057764e-314 observed vs 1.24921780949051038e-05 expected) [21908]
FAIL: shaw gcv: n=20 p=20 rnorm (0 observed vs 2.8900891951102595e-06 expected) [21909]

Fermé le Lundi <fermelelundi>
Thu 07 May 2015 11:26:20 PM UTC, original submission:  

There is a function for pre-bracketing the minimum for the gsl_min_fminimizer_* set of functions called gsl_min_find_bracket. This function can be forced to evaluate the function outside of the initial supplied bracket.

This is extremely bad as the function may not be defined outside of the initial range.

The attached program, gsl_bug.c, forces the bracketing to search outside of the initial range on a parabola, which should be a simple bracketing operation.

The attached patch follows the formulations formulations of bracketing from Brent's algorithm and the golden area search, by reducing the bracket area at each step.

In gsl_bug.c, the patched function performs a better bracketing with fewer iterations.

I did not exhaustively test this for failure cases, but it seems like it does a better job fulfilling the specifications.

I would like to hear if this was intended behavior or an actual bug.

Chris Mansley <cmansley>

 

Attached Files

Attached Files
file #33962:  gsl_bug.c added by cmansley (766B - text/x-csrc)
file #33963:  bracketing.patch added by cmansley (970B - text/x-patch)

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by fermelelundi (Posted a comment)
  • -email is unavailable- added by cmansley (Submitted the item)
  •  

    History

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-05-07 cmansley Attached File- Added gsl_bug.c, #33962
        Attached File- Added bracketing.patch, #33963

    Back to the top

    Powered by Savane 3.16-ed84.
    Corresponding source code