[ 
https://issues.apache.org/jira/browse/MATH-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13259803#comment-13259803
 ] 

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: https://issues.apache.org/jira/browse/MATH-782
>             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: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to