-
Bug
-
Resolution: Fixed
-
P5
-
1.0.2
-
1.2
-
sparc
-
solaris_2.4
-
Not verified
[Please see evaluation also]
Static Method longBitsToDouble(long bits) from Class Double returns wrong values
when bits is 0x7f80000000000000L and 0xff80000000000000L return should be Infinity and -Infinity. Run following code to reproduce problem
’ž†
public class LongToDouble {
public static void main(String[] argv) {
double d;
// Test For Infinity
d = Double.longBitsToDouble(0x7f80000000000000L);
if ( Double.isInfinite(d))
System.out.println("Test Passed for Infinity: " + Double.toString(d));
else
System.out.println("Test Failed for Infinity: " + Double.toString(d));
// Test For -Infinity
d = Double.longBitsToDouble(0xff80000000000000L);
if ( Double.isInfinite(d))
System.out.println("Test Passed for Infinity: " + Double.toString(d));
else
System.out.println("Test Failed for Infinity: " + Double.toString(d));
}
}