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
Operating System:  ubuntu 12.04 (kernel 3.8.0-44-generic) Status:  None
Assigned to:  None Open/Closed:  Open
Release:  1.15

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>


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

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)


Depends on the following items: None found

Items that depend on this one: None found


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

    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.13-c54d.
    Corresponding source code