Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 98440200AF6 for ; Fri, 27 May 2016 19:49:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 96C4E160A12; Fri, 27 May 2016 17:49:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D6D4D160A10 for ; Fri, 27 May 2016 19:49:13 +0200 (CEST) Received: (qmail 39906 invoked by uid 500); 27 May 2016 17:49:13 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 39889 invoked by uid 99); 27 May 2016 17:49:12 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 May 2016 17:49:12 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D4DDE2C1F60 for ; Fri, 27 May 2016 17:49:12 +0000 (UTC) Date: Fri, 27 May 2016 17:49:12 +0000 (UTC) From: "Earle Nietzel (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (MATH-1368) equalsIncludingNaN not producing the expected result MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 27 May 2016 17:49:14 -0000 Earle Nietzel created MATH-1368: ----------------------------------- Summary: 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)