Java Reference
In-Depth Information
A negative infinity compares less-than any other value, except itself.
The encoding for negative infinity is:
0xfff0000000000000L
POSITIVE_INFINITY
This constant returns the IEEE 754 value for positive infinity in double for-
mat. It is defined as follows:
public static final double POSITIVE_INFINITY;
A positive infinity compares greater-than any other value, except itself.
The encoding for positive infinity is:
0x7ff0000000000000L
The Class Double contains the following methods to test for these spe-
cial encodings.
public static boolean isInfinite(double v)
Argument v is the value to be tested. Returns true if the value is positive in-
finity or negative infinity; false otherwise.
public boolean isInfinite()
Returns true if the value represented by this object is positive infinity or
negative infinity; false otherwise.
public static boolean isNaN(double v)
Argument v is the value to be tested. Returns true if the value of the argu-
ment is NaN; false otherwise.
public boolean isNaN()
ReturnstrueifthevaluerepresentedbythisobjectisNaN;falseotherwise.
java.lang Class Float
This class contains several methods for converting and manipulating data
defined in IEEE 754 single format as well as methods for creating constants
and special types.
The following constants are defined in the class:
MAX_VALUE
This constant returns the largest magnitude that can be held in a variable of
type float. The constant is defined as:
Search WWH ::




Custom Search