-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
8
-
x86_64
-
windows_7
FULL PRODUCT VERSION :
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
DecimalFormat rounding is broken
REGRESSION. Last worked in version 7u51
ADDITIONAL REGRESSION INFORMATION:
Broken using:
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
Works using:
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
public class Test {
public static void main(String[] args) {
DecimalFormat df = new DecimalFormat("#.00");
df.setRoundingMode(RoundingMode.HALF_UP);
final String s = df.format(12.465d);
if (s.equals("12.47")) {
System.out.println("All is right with the world");
} else {
throw new RuntimeException("Rounding is broken in Java " + System.getProperty("java.version"));
}
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
"All is right with the world"
ACTUAL -
Exception in thread "main" java.lang.RuntimeException: Rounding is broken in Java 1.8.0
at Test.main(Test.java:32)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.math.RoundingMode;
import java.text.DecimalFormat;
public class Test {
public static void main(String[] args) {
DecimalFormat df = new DecimalFormat("#.00");
df.setRoundingMode(RoundingMode.HALF_UP);
final String s = df.format(12.465d);
if (s.equals("12.47")) {
System.out.println("All is right with the world");
} else {
throw new RuntimeException("Rounding is broken in Java " + System.getProperty("java.version"));
}
}
}
---------- END SOURCE ----------
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
DecimalFormat rounding is broken
REGRESSION. Last worked in version 7u51
ADDITIONAL REGRESSION INFORMATION:
Broken using:
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
Works using:
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
public class Test {
public static void main(String[] args) {
DecimalFormat df = new DecimalFormat("#.00");
df.setRoundingMode(RoundingMode.HALF_UP);
final String s = df.format(12.465d);
if (s.equals("12.47")) {
System.out.println("All is right with the world");
} else {
throw new RuntimeException("Rounding is broken in Java " + System.getProperty("java.version"));
}
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
"All is right with the world"
ACTUAL -
Exception in thread "main" java.lang.RuntimeException: Rounding is broken in Java 1.8.0
at Test.main(Test.java:32)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.math.RoundingMode;
import java.text.DecimalFormat;
public class Test {
public static void main(String[] args) {
DecimalFormat df = new DecimalFormat("#.00");
df.setRoundingMode(RoundingMode.HALF_UP);
final String s = df.format(12.465d);
if (s.equals("12.47")) {
System.out.println("All is right with the world");
} else {
throw new RuntimeException("Rounding is broken in Java " + System.getProperty("java.version"));
}
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-7131459 [Fmt-De] DecimalFormat produces wrong format() results when close to a tie
-
- Closed
-
-
JDK-7131459 [Fmt-De] DecimalFormat produces wrong format() results when close to a tie
-
- Closed
-
DecimalFormat with rounding mode regression defect
-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
8
-
x86_64
-
windows_7
FULL PRODUCT VERSION :
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
DecimalFormat rounding is broken
REGRESSION. Last worked in version 7u51
ADDITIONAL REGRESSION INFORMATION:
Broken using:
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
Works using:
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
public class Test {
public static void main(String[] args) {
DecimalFormat df = new DecimalFormat("#.00");
df.setRoundingMode(RoundingMode.HALF_UP);
final String s = df.format(12.465d);
if (s.equals("12.47")) {
System.out.println("All is right with the world");
} else {
throw new RuntimeException("Rounding is broken in Java " + System.getProperty("java.version"));
}
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
"All is right with the world"
ACTUAL -
Exception in thread "main" java.lang.RuntimeException: Rounding is broken in Java 1.8.0
at Test.main(Test.java:32)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.math.RoundingMode;
import java.text.DecimalFormat;
public class Test {
public static void main(String[] args) {
DecimalFormat df = new DecimalFormat("#.00");
df.setRoundingMode(RoundingMode.HALF_UP);
final String s = df.format(12.465d);
if (s.equals("12.47")) {
System.out.println("All is right with the world");
} else {
throw new RuntimeException("Rounding is broken in Java " + System.getProperty("java.version"));
}
}
}
---------- END SOURCE ----------
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
DecimalFormat rounding is broken
REGRESSION. Last worked in version 7u51
ADDITIONAL REGRESSION INFORMATION:
Broken using:
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)
Works using:
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
public class Test {
public static void main(String[] args) {
DecimalFormat df = new DecimalFormat("#.00");
df.setRoundingMode(RoundingMode.HALF_UP);
final String s = df.format(12.465d);
if (s.equals("12.47")) {
System.out.println("All is right with the world");
} else {
throw new RuntimeException("Rounding is broken in Java " + System.getProperty("java.version"));
}
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
"All is right with the world"
ACTUAL -
Exception in thread "main" java.lang.RuntimeException: Rounding is broken in Java 1.8.0
at Test.main(Test.java:32)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.math.RoundingMode;
import java.text.DecimalFormat;
public class Test {
public static void main(String[] args) {
DecimalFormat df = new DecimalFormat("#.00");
df.setRoundingMode(RoundingMode.HALF_UP);
final String s = df.format(12.465d);
if (s.equals("12.47")) {
System.out.println("All is right with the world");
} else {
throw new RuntimeException("Rounding is broken in Java " + System.getProperty("java.version"));
}
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-7131459 [Fmt-De] DecimalFormat produces wrong format() results when close to a tie
-
- Closed
-
-
JDK-7131459 [Fmt-De] DecimalFormat produces wrong format() results when close to a tie
-
- Closed
-