commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <>
Subject [jira] [Commented] (MATH-782) BrentOptimizer: User-defined check block is badly placed
Date Mon, 23 Apr 2012 18:20:35 GMT


Gilles commented on MATH-782:

I saw that too. And I'm not sure.
Clearly, what was there before was wrong: If there is no update of "x" and "fx" before the
user-defined check is performed, the "previous" and "current" will hold the same values, leading
to an early exit. The test which I've added fails miserably with the check statement located
at its original place.
I don't know the details of the algorithm, but there is only one block where "x" and "fx"
are updated; thus it would seem safe that the user's check is placed there.

> BrentOptimizer: User-defined check block is badly placed
> --------------------------------------------------------
>                 Key: MATH-782
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Gilles
>            Assignee: Gilles
>             Fix For: 3.1
>         Attachments: MATH-782.patch
> The CM implementation of Brent's original algorithm was supposed to allow for a user-defined
stopping criterion (in addition to Brent's default one).
> However, it turns out that this additional block of code is not at the right location,
implying an unwanted early exit.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message