-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
P2
-
None
-
Affects Version/s: 1.1
-
Component/s: core-libs
-
sparc
-
solaris_2.5
This constructor can create objects with incorrect values
==== Here is the minimized test demonstrating the bug ====
import java.lang.Bignum;
class java_lang_Bignum_constructor {
public static void main(String args[]) {
Bignum b=new Bignum(0.0001F,20);
System.out.println(b); // should print 0.00010000000000000000
System.out.println(b.floatValue()); // should print 0.0001
}
}
===== Here is the output of the test ====
999999.97473787520000000000
1000000.0
==== Here is the minimized test demonstrating the bug ====
import java.lang.Bignum;
class java_lang_Bignum_constructor {
public static void main(String args[]) {
Bignum b=new Bignum(0.0001F,20);
System.out.println(b); // should print 0.00010000000000000000
System.out.println(b.floatValue()); // should print 0.0001
}
}
===== Here is the output of the test ====
999999.97473787520000000000
1000000.0