-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.1
-
x86
-
windows_nt
Name: mc57594 Date: 01/20/97
the following java code:
class foo {
public static void main( String argv[] ) {
float f1 = 0.0f/0.0f;
float f2 = 3.2f;
float f3 = f1 % f2;
float f4 = f1 * f2;
System.out.println(f1);
System.out.println(f2);
System.out.println(f3);
System.out.println(f4);
}
}
produces the following incorrect output using JDK1.1beta2 and
JCK1.1beta3.2
NaN
3.2
-0.0
NaN
The output should be :
NaN
3.2
NaN
NaN
which is the result given using the JDK1.1alpha VM (except that -NaN was
displayed, but that bug got fixed). The problem is not with the compiler
(javac), because the byte codes are correct and the class file produced
using the JDK1.1alpha compiler also executes wrong using JDK1.1beta2 and
JDK1.1beta3.2 VM (java.exe).
======================================================================