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

Gilles commented on MATH-1185:
------------------------------

I think that the issue is not the subtraction, but that the value of "x" is 1.0 
(not just "close to 1").
{noformat}
f(130.0)=0.9999999999999999
f(131.0)=1.0
{noformat}
But the reason is still as Luc described: There is no way to squeeze another 
floating-point number between f(130.0) and f(131.0) using "double" precision:
{noformat}
Math.nextUp(0.9999999999999999)=1.0
{noformat}

> Tail probability drops to zero beyond 10e-17 ?
> ----------------------------------------------
>
>                 Key: MATH-1185
>                 URL: https://issues.apache.org/jira/browse/MATH-1185
>             Project: Commons Math
>          Issue Type: Wish
>    Affects Versions: 3.3, 3.4
>            Reporter: Sriram Natarajan
>            Priority: Minor
>
> This could be a  simple question, In which case I can expect a clarification. 
> If this is the wrong place to post such a question, let me know.
> OS: Windows 8.1, Java 1.8.0_25
> ChiSquaredDistribution chisq = new ChiSquaredDistribution(23)
> 1.0 - chisq.cumulativeProbability(130) is  1.1102230246251565E-16
> 1.0 - chisq.cumulativeProbability(131) is  0.0  
> Am pretty sure it is not a formatting issue.  Is there a reason why the tail 
> drops to zero at this point?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to