Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0490210563 for ; Thu, 16 Jan 2014 21:55:35 +0000 (UTC) Received: (qmail 756 invoked by uid 500); 16 Jan 2014 21:55:21 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 690 invoked by uid 500); 16 Jan 2014 21:55:20 -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 681 invoked by uid 99); 16 Jan 2014 21:55:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jan 2014 21:55:19 +0000 Date: Thu, 16 Jan 2014 21:55:19 +0000 (UTC) From: "Thomas Neidhart (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MATH-1089) Precision.round() returns different results when provided negative zero as double or float MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MATH-1089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13874004#comment-13874004 ] Thomas Neidhart commented on MATH-1089: --------------------------------------- This not only affects negative zero, but all negative values that would be rounded to 0. In these cases the result should be negative zero to be consistent with the result of Precision.round(float, x). > Precision.round() returns different results when provided negative zero as double or float > ------------------------------------------------------------------------------------------ > > Key: MATH-1089 > URL: https://issues.apache.org/jira/browse/MATH-1089 > Project: Commons Math > Issue Type: Bug > Reporter: Thomas Neidhart > > Precision.round(-0.0d, x) = 0.0 > Precision.round(-0.0f, x) = -0.0 > After discussion on the mailinglist, the result should always be -0.0. -- This message was sent by Atlassian JIRA (v6.1.5#6160)