Name: akC45999 Date: 01/13/97
The Java Virtual Machine, section drem, claims:
If either value is NaN, the resuly is NaN.
Meanwhile, following test fails:
--------------------- drem00101.java
package javasoft.sqe.tests.vm.drem.drem001.drem00101;
import java.io.PrintStream;
import java.lang.Double;
public class drem00101
{
public static void main(String argv[])
{
System.exit(run(argv, System.out));
}
public static int run(String argv[], PrintStream out)
{
double NaN = Double.NaN;
double d = 3.14;
double zero = 0.0;
if (! Double.isNaN(d % NaN))
return 2;
else if (! Double.isNaN(NaN % zero))
return 2;
else if (! Double.isNaN(NaN % NaN))
return 2;
return 0;
}
}
---------------------
======================================================================