OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libjava/] [testsuite/] [libjava.lang/] [CompareNaN.java] - Rev 775

Go to most recent revision | Compare with Previous | Blame | View Log

/*
 * 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);
  }
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.