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


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

Submitted by:  Olaf Till <i7tiol>
Submitted on:  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

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


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>
Project 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>
Project 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>
Project 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>
Project Member


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

Attach Files:

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)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project 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 => Regression
    2018-08-05 caliari Attached File- => Added fzero.diff, #44712
        StatusNone => Patch Submitted

    Back to the top

    Powered by Savane 3.4