Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 78427 invoked from network); 8 Apr 2010 15:49:00 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Apr 2010 15:49:00 -0000 Received: (qmail 71339 invoked by uid 500); 8 Apr 2010 15:49:00 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 71276 invoked by uid 500); 8 Apr 2010 15:49:00 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 71269 invoked by uid 99); 8 Apr 2010 15:49:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Apr 2010 15:49:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Apr 2010 15:48:58 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D85B3234C4AE for ; Thu, 8 Apr 2010 15:48:36 +0000 (UTC) Message-ID: <1244375028.13171270741716884.JavaMail.jira@brutus.apache.org> Date: Thu, 8 Apr 2010 15:48:36 +0000 (UTC) From: "Pons Rudy (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-6486) [classlib][luni] java.util.Formatter rounding error In-Reply-To: <1235188359.540721269832467279.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-6486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854961#action_12854961 ] Pons Rudy commented on HARMONY-6486: ------------------------------------ After working some times on this bug, I have seen at least one of the cause of failures : when we use DecimalFormat with a RoundingMode different from HALF_EVEN, small negatives numbers round to 0.0 instead of -0.0 in RI and some tests. Harmony delegate this operations to icu4j, so i have created a ticket in icu (http://bugs.icu-project.org/trac/ticket/7609). I will have more free time this week-end and next week, so i will take a look to see if there is other problems in code, and try to provide a patch for icu. > [classlib][luni] java.util.Formatter rounding error > --------------------------------------------------- > > Key: HARMONY-6486 > URL: https://issues.apache.org/jira/browse/HARMONY-6486 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Pons Rudy > Assignee: Mark Hindess > Attachments: 6486-java6.patch > > > Formatter use DecimalFormat to format numbers, with the default rounding mode (RoundingMode.HALF_EVEN) instead of RoundingMode.HALF_UP, ie System.out.printf("%.1f", 0.25); will print 0.2 instead of 0.3. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.