You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Fursov (JIRA)" <ji...@apache.org> on 2006/07/26 16:25:13 UTC
[jira] Created: (HARMONY-988) Formatting doubles: different
behaviour with RI
Formatting doubles: different behaviour with RI
-----------------------------------------------
Key: HARMONY-988
URL: http://issues.apache.org/jira/browse/HARMONY-988
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Mikhail Fursov
Priority: Minor
This simple line produces different results using RI and Harmony VMs
System.out.format("%.1f\n", 1.45);
Harmony: 1.4
RI: 1.5
I think that this is our bug.
I tried to find the source of the problem but faced with problem that I can't find sources for com.ibm.icu.text.DecimalFormat file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-988) Formatting doubles: different
behaviour with RI
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-988?page=comments#action_12428114 ]
Alexey A. Ivanov commented on HARMONY-988:
------------------------------------------
It seems to be a bug of Harmony, since 'f' formatter should use round half up algorithm. See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html#dndec and http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html#ROUND_HALF_UP respectively.
> Formatting doubles: different behaviour with RI
> -----------------------------------------------
>
> Key: HARMONY-988
> URL: http://issues.apache.org/jira/browse/HARMONY-988
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Mikhail Fursov
> Priority: Minor
>
> This simple line produces different results using RI and Harmony VMs
> System.out.format("%.1f\n", 1.45);
> Harmony: 1.4
> RI: 1.5
> I think that this is our bug.
> I tried to find the source of the problem but faced with problem that I can't find sources for com.ibm.icu.text.DecimalFormat file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-988) Formatting doubles: different
behaviour with RI
Posted by "Mikhail Loenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-988?page=comments#action_12446816 ]
Mikhail Loenko commented on HARMONY-988:
----------------------------------------
the patch causes failures of
tests.api.java.util.FormatterTest
> Formatting doubles: different behaviour with RI
> -----------------------------------------------
>
> Key: HARMONY-988
> URL: http://issues.apache.org/jira/browse/HARMONY-988
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Mikhail Fursov
> Assigned To: Mikhail Loenko
> Priority: Minor
> Attachments: diff.txt
>
>
> This simple line produces different results using RI and Harmony VMs
> System.out.format("%.1f\n", 1.45);
> Harmony: 1.4
> RI: 1.5
> I think that this is our bug.
> I tried to find the source of the problem but faced with problem that I can't find sources for com.ibm.icu.text.DecimalFormat file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (HARMONY-988) Formatting doubles: different
behaviour with RI
Posted by "Mikhail Loenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-988?page=all ]
Mikhail Loenko reassigned HARMONY-988:
--------------------------------------
Assignee: Mikhail Loenko
> Formatting doubles: different behaviour with RI
> -----------------------------------------------
>
> Key: HARMONY-988
> URL: http://issues.apache.org/jira/browse/HARMONY-988
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Mikhail Fursov
> Assigned To: Mikhail Loenko
> Priority: Minor
> Attachments: diff.txt
>
>
> This simple line produces different results using RI and Harmony VMs
> System.out.format("%.1f\n", 1.45);
> Harmony: 1.4
> RI: 1.5
> I think that this is our bug.
> I tried to find the source of the problem but faced with problem that I can't find sources for com.ibm.icu.text.DecimalFormat file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-988) Formatting doubles: different
behaviour with RI
Posted by "Mike Ringrose (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-988?page=all ]
Mike Ringrose updated HARMONY-988:
----------------------------------
Attachment: diff.txt
The attached patch resolves the differences with the RI and Harmony by doing half up rounding.
> Formatting doubles: different behaviour with RI
> -----------------------------------------------
>
> Key: HARMONY-988
> URL: http://issues.apache.org/jira/browse/HARMONY-988
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Mikhail Fursov
> Priority: Minor
> Attachments: diff.txt
>
>
> This simple line produces different results using RI and Harmony VMs
> System.out.format("%.1f\n", 1.45);
> Harmony: 1.4
> RI: 1.5
> I think that this is our bug.
> I tried to find the source of the problem but faced with problem that I can't find sources for com.ibm.icu.text.DecimalFormat file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira