summaryrefslogtreecommitdiff
path: root/java/jdk15/files/patch-FloatingDecimal.java
blob: 6141b18cb7ebcb03840055eb6a9a7c683b3f72d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
--- ../../j2se/src/share/classes/sun/misc/FloatingDecimal.java.orig	2011-02-08 21:47:56.000000000 -0800
+++ ../../j2se/src/share/classes/sun/misc/FloatingDecimal.java	2011-02-08 21:48:18.000000000 -0800
@@ -1529,7 +1529,7 @@
 		if ( (cmpResult = bigB.cmp( bigD ) ) > 0 ){
 		    overvalue = true; // our candidate is too big.
 		    diff = bigB.sub( bigD );
-		    if ( (bigIntNBits == 1) && (bigIntExp > -expBias) ){
+		    if ( (bigIntNBits == 1) && (bigIntExp > -expBias+1) ){
 			// candidate is a normalized exact power of 2 and
 			// is too big. We will be subtracting.
 			// For our purposes, ulp is the ulp of the