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

Virendra Singh commented on MATH-1491:
--------------------------------------

Hi [~lingchao], I looked into your issue, I checked it on version 2.2 & 3.6 
with your Test case. I found that version 2.2 gives the Percentile value = 
*7.55* while the version 3.6 gives the Percentile value = 
*7.550000000000001*(for this particular test case).

It can be solved if you add delta/tolerance *1e-15* in 
assertEquals(expected,actual,delta) method.

> Percentile computational accuracy issue
> ---------------------------------------
>
>                 Key: MATH-1491
>                 URL: https://issues.apache.org/jira/browse/MATH-1491
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.4, 3.4.1, 3.5, 3.6, 3.6.1
>         Environment: System: Linux testinglab 4.4.0-131-generic 
> #157~14.04.1-Ubuntu
> Java version "1.8.0_191"
> Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
> Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
>  
>  
>            Reporter: Lingchao Chen
>            Priority: Major
>              Labels: performance
>         Attachments: BugDemo.java
>
>
> Hi, 
> The percentile method works well on the older versions, e.g., the version 
> before 3.4. However, when I update commons-math to the newer version, there 
> produces a computational accuracy issue. There is a backward compatibility 
> bug behind it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to