bugGNU Octave - Bugs: bug #64878, fminbnd missing a check for bounds...

 
 

bug #64878: fminbnd missing a check for bounds a and b

Submitter:  Liang Tang <lt1234>
Submitted:  Thu 09 Nov 2023 07:39:22 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  lt1234 Open/Closed:  * Open
Release:  * 8.2.0 Operating System:  * Microsoft Windows
Fixed Release:  10.1.0 (current default) Planned Release:  10.1.0 (current default)
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 25 Nov 2023 02:33:16 AM UTC, comment #2: 

Thanks.

Liang Tang <lt1234>
Sat 25 Nov 2023 02:12:23 AM UTC, comment #1: 

This was simple enough to fix.  I made the change here http://hg.savannah.gnu.org/hgweb/octave/rev/70e1451ed9c7.

Unfortunately, the release process for Octave 9 has already started so new features are going onto the development branch (Octave 10) which will be released in approximately one year.  If you need the fix sooner you can simply copy the fminbnd.m file from the Mercurial repository.

Rik <rik5>
Group administrator
Thu 09 Nov 2023 07:39:22 PM UTC, original submission:  

fminbnd documentation specifies the requirements for bounds:  The endpoints must be finite.

The 8.2.0 code itself does not check for if the end points are finite.  Please see the example error state when illegal bound specifications are not rejected.  A "isfinite" check may be inserted to detect the input errors.  Thanks.

func=@(x) x.^2;
function stop=func_out(x, optv, state), stop=0; display(x); end
options=optimset('fminbnd'); options.OutputFcn=@func_out;
[k, fval, exitflag, output] = fminbnd (func, -100, 100, options) 
[k, fval, exitflag, output] = fminbnd (func, [], [], options)
[k, fval, exitflag, output] = fminbnd (func, -inf, inf, options) 
 





Liang Tang <lt1234>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-11-25 rik5 StatusNone Fixed
        Fixed ReleaseNone 10.1.0 (current default)
        Planned ReleaseNone 10.1.0 (current default)

    Back to the top

    Powered by Savane 3.12