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] Updated: (HARMONY-6486) [classlib][luni] java.util.Formatter rounding error
Date Mon, 29 Mar 2010 03:24:27 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pons Rudy updated HARMONY-6486:
-------------------------------

    Attachment: 6486-java6.patch

A patch for the java6 branch. It only calls DecimalFormat.setRoundingMode(RoundingMode.HALF_UP),
and add regression tests.
Working on a java5 patch, but java5 don't have DecimalFormat.setRoundingMode.

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