harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pons Rudy (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-6486) [classlib][luni] java.util.Formatter rounding error
Date Thu, 08 Apr 2010 15:48:36 GMT

    [ 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.


Mime
View raw message