commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sébastien Brisard (JIRA) <>
Subject [jira] [Commented] (MATH-909) FDistribution NoBracketingException in BrentSolver
Date Mon, 26 Nov 2012 09:58:58 GMT


Sébastien Brisard commented on MATH-909:

bq. The FDistribution relies on the Beta function, which got several improvements in terms
of accuracy since the 3.0 release.

Actually, in the lastest trunk {{r1413531}}, {{Beta}} hasn't been changed yet (ongoing work
in MATH-738). Accuracy of {{Gamma.logGamma}} has improved a lot (see MATH-849) which might
explain why this bug no longer shows up.

Even if this should not be considered as a bug, I propose we include this simple test in our
unit tests, as {{Beta}} will undergo some changes in the coming days, hopefully for the best,
but it never hurts to check non-regression, does it?
> FDistribution NoBracketingException in BrentSolver
> --------------------------------------------------
>                 Key: MATH-909
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>            Reporter: Patrick Meyer
>   Original Estimate: 24h
>  Remaining Estimate: 24h
> I get an exception when running the code below. the exception is 
> {code}
> function values at endpoints do not have different signs, endpoints: [0, 1.002], values:
[-0.025, -∞]
> {code}
> The problematic code:
> {code}
> double df1 = 10675;
> double df2 = 501725;
> FDistribution fDist = new FDistribution(df1, df2);
> System.out.println(fDist.inverseCumulativeProbability(0.025));//NoBracketingException
> {code}
> However, R returns the value 0.9733505. The R code is:
> {code}
> qf(p=.025, df1=10675, df2=501725)
> {code}
> I don't know enough about the FDistribution class to know the solution to the exception,
but I thought I would report it.

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

View raw message