bugGNU Octave - Bugs: bug #54445, fzero doesn't (always) accept...

 
 

bug #54445: fzero doesn't (always) accept initial value 0

Submitter:  Olaf Till <i7tiol>
Submitted:  Sat 04 Aug 2018 04:24:18 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Olaf Till Open/Closed:  * Closed
Release:  * 4.4.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 06 Aug 2018 04:24:50 AM UTC, comment #3: 

I modified the changeset to remove the change regarding slope0.  slope0 is the initial slope and has to be computed at the start so that it can be compared later to the actual slope at the solution.  But it isn't a problem, because when the first issue with bracketing is fixed then b and a can no longer be the same and (b - a) is no longer zero.

For the final cset see https://hg.savannah.gnu.org/hgweb/octave/rev/092bb49b6962.

Marking as fixed and closing report.

Rik <rik5>
Group administrator
Mon 06 Aug 2018 03:39:14 AM UTC, comment #2: 

Marking as a regression as well since this worked in 4.2.2.  I will take a look at Marco's patch.  I was in the midst of updating other parts of fzero.m anyways.

Rik <rik5>
Group administrator
Sun 05 Aug 2018 09:26:21 AM UTC, comment #1: 

They are two different bugs, although both related to the initial bracketing. The attached patch solves both problems for me.

(file #44712)

Marco Caliari <caliari>
Group Member
Sat 04 Aug 2018 04:24:18 PM UTC, original submission:  

fzero doesn't (always) accept initial value 0 any more:

octave:4> fzero (@ (x) x + 1, 1)
ans = -1

octave:5> fzero (@ (x) x + 1, 0)
error: fzero: not a valid initial bracketing
error: called from
    fzero at line 178 column 5

Maybe unrelated (sorry):
octave:3> fzero (@ (x) x, 0)
warning: division by zero
warning: called from
    fzero at line 181 column 10
ans = 0

Olaf Till <i7tiol>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44712:  fzero.diff added by caliari (2KiB - application/x-tex)

 

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 caliari (Updated the item)
  • -email is unavailable- added by i7tiol (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 group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-06 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2018-08-06 rik5 Item GroupUnexpected Error or Warning Regression
    2018-08-05 caliari Attached File- Added fzero.diff, #44712
        StatusNone Patch Submitted

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code