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 (JIRA)" <ji...@apache.org> on 2016/05/28 02:22:12 UTC

[jira] [Commented] (MATH-1368) equalsIncludingNaN not producing the expected result

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

Gilles commented on MATH-1368:
------------------------------

Version 2.2 is very old.
The methods you refer to do not exist in more recent releases; the equivalent functionality is implemented in class {{Precision}}.

> equalsIncludingNaN not producing the expected result
> ----------------------------------------------------
>
>                 Key: MATH-1368
>                 URL: https://issues.apache.org/jira/browse/MATH-1368
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 2.2
>            Reporter: Earle Nietzel
>
> I wouldn't expect this result given these 2 values?
> x=-1.0, y=4.0
> x to long bits = -4616189618054758400
> y to long bits = 4616189618054758400
> x equals y = false
> MathUtils.equalsIncludingNaN(x, y) = true
> MathUtils.equals(x, y) = false
> It appears the lexicographic ordering logic is producing this, other numbers are fine. Notice the value produced for -1.0 and 4.0 by Double.doubleToLongBits().



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