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

Submitted by:  Chris Mansley <cmansley>
Submitted on:  Thu 07 May 2015 11:26:20 PM UTC  
 
Category: Runtime errorSeverity: 3 - Normal
Operating System: ubuntu 12.04 (kernel 3.8.0-44-generic)Status: None
Assigned to: NoneOpen/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>

 

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
  • -unavailable- added by cmansley (Submitted the item)
  •  

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

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 07 May 2015 11:26:20 PM UTCcmansleyAttached File-=>Added gsl_bug.c, #33962
      Attached File-=>Added bracketing.patch, #33963

    Back to the top


    Powered by Savane 3.1-cleanup1