/**
* className:HelloWorld
* Description:Java的基础类型Double三个基础常量
*
* @author:yanmh
*/
public class HelloWorld {
public static void main(String[] args) {
System.out.println(":::::");
/**
* A constant holding the positive infinity of type
* {@code double}. It is equal to the value returned by
* {@code Double.longBitsToDouble(0x7ff0000000000000L)}.
* 正无穷
*/
// public static final double POSITIVE_INFINITY = 1.0 / 0.0;
System.out.println("Double.POSITIVE_INFINITY "+Double.POSITIVE_INFINITY);
/**
* A constant holding a Not-a-Number (NaN) value of type
* {@code double}. It is equivalent to the value returned by
* {@code Double.longBitsToDouble(0x7ff8000000000000L)}.
* 负无穷
*/
//public static final double NEGATIVE_INFINITY = -1.0 / 0.0;
System.out.println("Double.NEGATIVE_INFINITY "+Double.NEGATIVE_INFINITY);
/**
* A constant holding a Not-a-Number (NaN) value of type
* {@code double}. It is equivalent to the value returned by
* {@code Double.longBitsToDouble(0x7ff8000000000000L)}.
*/
//public static final double NaN = 0.0d / 0.0;
System.out.println("Double.NaN "+Double.NaN);
}
}