comparenan.java

来自「Mac OS X 10.4.9 for x86 Source Code gcc」· Java 代码 · 共 16 行

JAVA
16
字号
/* * 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);  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?