You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Phil Steitz (JIRA)" <ji...@apache.org> on 2010/02/22 13:04:27 UTC

[jira] Commented: (MATH-282) ChiSquaredDistributionImpl.cumulativeProbability > 1

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

Phil Steitz commented on MATH-282:
----------------------------------

I have narrowed this down to two issues in Gamma

*  choice of when to use the series expansion vs continued fraction in computing the regularized gamma functions - changing from (a >= 1.0 && x > a) to (x > a + 1) as criteria for when to use continued fraction reduces incidence of NaN values returned and improves accuracy for some arguments.
*  handling the case when the continued fraction diverges.  I am still working on convincing myself that divergence is expected in failing test cases, in which case, logic can be changed to catch the continued fraction divergence and fall back to the series approximation in that case.  This will require refactoring the regularizedGammaP and Q functions to encapsulate the series / fraction computation instead of calling one another based on argument test.


> ChiSquaredDistributionImpl.cumulativeProbability > 1
> ----------------------------------------------------
>
>                 Key: MATH-282
>                 URL: https://issues.apache.org/jira/browse/MATH-282
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 1.0, 1.1, 1.2, 2.0
>         Environment: called from Scala code
>            Reporter: Adam Kiezun
>            Assignee: Phil Steitz
>             Fix For: 2.1
>
>         Attachments: math-282.patch
>
>
> Calling 
> new ChiSquaredDistributionImpl(1.0).cumulativeProbability(66.41528551683048)
> returns 1.000000000000004, which is bogus (should never be > 1)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.