You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles Sadowski (Jira)" <ji...@apache.org> on 2019/12/09 11:16:00 UTC

[jira] [Commented] (MATH-1505) Precision.equals says that 4 equals -1

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

Gilles Sadowski commented on MATH-1505:
---------------------------------------

Did you check that this occurs with the latest version of the library?

> Precision.equals says that 4 equals -1
> --------------------------------------
>
>                 Key: MATH-1505
>                 URL: https://issues.apache.org/jira/browse/MATH-1505
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.3
>         Environment: Java 1.8, Eclipse, version 3-3.3
>            Reporter: Radu-Cristian Neagoe
>            Priority: Major
>
> The method 
> boolean org.apache.commons.math3.util.Precision.equals(double x, double y, double eps)
>  is returning true when I call it with the parameters: 4.0, -1.0, 10E-14.
>  Same result for compareTo(...)
>  Below the code:
> [https://pastebin.com/XQ3RTuTq]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)