[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/23466] New: Double.toString(0.0010) ---> "0.001" ISO "0.0
From: |
veldema at cs dot fau dot de |
Subject: |
[Bug classpath/23466] New: Double.toString(0.0010) ---> "0.001" ISO "0.0010" |
Date: |
18 Aug 2005 17:30:19 -0000 |
Tried with gcj 4/3.4 and own compiler with classpath from CVS:
Double.toString() gives wrong answer for some inputs.
Example:
--------------[input]----------
class hi {
static double a = 0.0010;
public static void main(String args[]) {
System.out.println("hi:" + a);
}
}
-----------[outputs]--------------
address@hidden:~/tests> javac hi.java
address@hidden:~/tests> java hi
hi:0.0010
address@hidden:~/tests> gcj hi.java --main=hi
address@hidden:~/tests> ./a.out
hi:0.001
-----------[ problem ]-----------------
The problematic code is in _dtoa somewhere.
Also, shouldn't the call to _dtoa be:
_dtoa (value, 0, (isFloat ? 20 : 1), &decpt, &sign, NULL, buffer, (int)
isFloat);
???
--
Summary: Double.toString(0.0010) ---> "0.001" ISO "0.0010"
Product: classpath
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: classpath
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: veldema at cs dot fau dot de
CC: bug-classpath at gnu dot org,veldema at cs dot fau dot
de
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23466
- [Bug classpath/23466] New: Double.toString(0.0010) ---> "0.001" ISO "0.0010",
veldema at cs dot fau dot de <=
- [Bug libgcj/23466] Double.toString(0.0010) ---> "0.001" ISO "0.0010", pinskia at gcc dot gnu dot org, 2005/08/18
- [Bug libgcj/23466] Double.toString(0.0010) ---> "0.001" ISO "0.0010", robilad at kaffe dot org, 2005/08/18
- [Bug libgcj/23466] Double.toString(0.0010) ---> "0.001" ISO "0.0010", tromey at gcc dot gnu dot org, 2005/08/19
- [Bug libgcj/23466] Double.toString(0.0010) ---> "0.001" ISO "0.0010", veldema at cs dot fau dot de, 2005/08/22
- [Bug libgcj/23466] Double.toString(0.0010) ---> "0.001" ISO "0.0010", veldema at cs dot fau dot de, 2005/08/22
- [Bug libgcj/23466] Double.toString(0.0010) ---> "0.001" ISO "0.0010", robilad at kaffe dot org, 2005/08/22
- [Bug libgcj/23466] call to _dtoa is possibly incorrect, tromey at gcc dot gnu dot org, 2005/08/22