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

Alex Herbert commented on STATISTICS-36:
----------------------------------------

That comment originates when [Statistics] did not depend on the latest 
snapshot. Now that it does I've been updating the Brent solver directly in 
[Numbers]. I will delete all these TODO comments when this is resolved.

Re: The epsilon in the Brent solver.

Setting a very low value works. sqrt(eps) would be sqrt(2^-52) = 1.49e-8. This 
is way above the current threshold of 1e-14.  I've not stepped through the code 
in a debugger to see if this is making good steps towards the solution. However 
if the difference between the current bracket bounds is less than the tolerance 
then bisection is forced. So the code should work even when all tolerances are 
set to 0 as it will default to bisection until within 1 ulp of the root or the 
search naturally ends as the bracket is zero size.

> Optimise the default inverse CDF function for continuous distributions
> ----------------------------------------------------------------------
>
>                 Key: STATISTICS-36
>                 URL: https://issues.apache.org/jira/browse/STATISTICS-36
>             Project: Apache Commons Statistics
>          Issue Type: Improvement
>          Components: distribution
>    Affects Versions: 1.0
>            Reporter: Alex Herbert
>            Assignee: Alex Herbert
>            Priority: Minor
>
> Many distributions only compute the inverse CDF to 1e-9 relative error. Some 
> fail to compute when the input p value maps to a very small x value (e.g. 
> 1e-50). This is related to the defaults for the brent solver used in the 
> default implementation.
> Investigation of tolerances in the brent solver discovered a bug when 
> evaluating very small objective functions ([NUMBERS-168]).
> The brent solver requires a release to be used with this fix so work can use 
> a local copy until all issues with it have been resolved, and the changes 
> ported back to numbers.
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to