gcc/libjava/testsuite/libjava.lang/CompareNaN.java
Jeff Sturm ba5d2d3dc1 CompareNaN.java: New test.
* libjava.lang/CompareNaN.java: New test.
* libjava.lang/CompareNaN.out: New test.

From-SVN: r63003
2003-02-17 16:07:49 +00:00

16 lines
430 B
Java

/*
* JLS 4.2.3 specifies that (x op y) must be false if either x or y
* is NaN and op is one of <, >, <=, >=, or ==.
*
* Some targets may need specific options wired into libgcj.spec
* to pass this test. For example, alpha-linux requires -mieee
* to prevent an unrecoverable fp trap.
*/
public class CompareNaN {
public static void main(String[] args) {
double x = Double.NaN;
System.out.println(x == x);
}
}