[ 
https://issues.apache.org/jira/browse/NUMBERS-211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alex Herbert resolved NUMBERS-211.
----------------------------------
    Fix Version/s: 1.4
         Assignee: Alex Herbert
       Resolution: Fixed

Updated to bound the convergence tolerance to at least 1 ULP in commit:

a4b3841d18dab3b0f3e2e6b240c428c9cf4865f9

This allows the solver to be easily configured for maximum precision using 
accuracies of zero.

> BrentSolver infinite loop when convergence is not possible
> ----------------------------------------------------------
>
>                 Key: NUMBERS-211
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-211
>             Project: Commons Numbers
>          Issue Type: Bug
>          Components: rootfinder
>    Affects Versions: 1.3
>            Reporter: Alex Herbert
>            Assignee: Alex Herbert
>            Priority: Minor
>             Fix For: 1.4
>
>
> The BrentSolver can be configured with convergence accuracies that are not 
> possible to achieve. This situation occurs when the relative accuracy for the 
> values is zero, and the absolute accuracy is smaller than the difference 
> between the values at the root.
> An example is the function:
> {noformat}
> f(x) = x^2 - 2{noformat}
> The root is at x = sqrt(2). If the solver is created with a relative accuracy 
> of zero and an absolute accuracy below the ULP of sqrt(2), e.g. 1e-30, then 
> the convergence criteria cannot be met. The algorithm will infinite loop with 
> the bracket at sqrt(2) and sqrt(2) + 1 ULP.
> Issue identified using a security scan.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to