Double

Undocumented in source.

Constructors

this
this(double value)

Constructs a newly allocated {@code Double} object that represents the primitive {@code double} argument.

this
this(string s)

Constructs a newly allocated {@code Double} object that represents the floating-point value of type {@code double} represented by the string. The string is converted to a {@code double} value as if by the {@code valueOf} method.

Members

Functions

isInfinite
bool isInfinite()

Returns {@code true} if this {@code Double} value is infinitely large in magnitude, {@code false} otherwise.

isNaN
bool isNaN()

Returns {@code true} if this {@code Double} value is a Not-a-Number (NaN), {@code false} otherwise.

toHash
size_t toHash()

Returns a hash code for a {@code double} value; compatible with {@code Double.hashCode()}.

Static functions

doubleToLongBits
long doubleToLongBits(double value)

Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout.

doubleToRawLongBits
long doubleToRawLongBits(double value)

Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout, preserving Not-a-Number (NaN) values.

isFinite
bool isFinite(double d)

Returns {@code true} if the argument is a finite floating-point value; returns {@code false} otherwise (for NaN and infinity arguments).

isInfinite
bool isInfinite(double v)

Returns {@code true} if the specified number is infinitely large in magnitude, {@code false} otherwise.

isNaN
bool isNaN(double v)

Returns {@code true} if this {@code Double} value is a Not-a-Number (NaN), {@code false} otherwise.

longBitsToDouble
double longBitsToDouble(long bits)

Returns the {@code double} value corresponding to a given bit representation. The argument is considered to be a representation of a floating-point value according to the IEEE 754 floating-point "double format" bit layout.

parseDouble
double parseDouble(string s)
Undocumented in source. Be warned that the author may not have intended to support it.
valueOf
Double valueOf(double d)

Returns a {@code Double} instance representing the specified {@code double} value. If a new {@code Double} instance is not required, this method should generally be used in preference to the constructor {@link #Double(double)}, as this method is likely to yield significantly better space and time performance by caching frequently requested values.

Variables

BYTES
enum int BYTES;

The number of bytes used to represent a {@code double} value.

MAX_EXPONENT
enum int MAX_EXPONENT;

Maximum exponent a finite {@code double} variable may have. It is equal to the value returned by {@code Math.getExponent(Double.MAX_VALUE)}.

MAX_VALUE
enum double MAX_VALUE;

A constant holding the largest positive finite value of type {@code double}, (2-2<sup>-52</sup>)&middot;2<sup>1023</sup>. It is equal to the hexadecimal floating-point literal {@code 0x1.fffffffffffffP+1023} and also equal to {@code Double.longBitsToDouble(0x7fefffffffffffffL)}.

MIN_EXPONENT
enum int MIN_EXPONENT;

Minimum exponent a normalized {@code double} variable may have. It is equal to the value returned by {@code Math.getExponent(Double.MIN_NORMAL)}.

MIN_NORMAL
enum double MIN_NORMAL;

A constant holding the smallest positive normal value of type {@code double}, 2<sup>-1022</sup>. It is equal to the hexadecimal floating-point literal {@code 0x1.0p-1022} and also equal to {@code Double.longBitsToDouble(0x0010000000000000L)}.

MIN_VALUE
enum double MIN_VALUE;

A constant holding the smallest positive nonzero value of type {@code double}, 2<sup>-1074</sup>. It is equal to the hexadecimal floating-point literal {@code 0x0.0000000000001P-1022} and also equal to {@code Double.longBitsToDouble(0x1L)}.

NEGATIVE_INFINITY
enum double NEGATIVE_INFINITY;

A constant holding the negative infinity of type {@code double}. It is equal to the value returned by {@code Double.longBitsToDouble(0xfff0000000000000L)}.

NaN
enum double NaN;

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)}.

POSITIVE_INFINITY
enum double POSITIVE_INFINITY;

A constant holding the positive infinity of type {@code double}. It is equal to the value returned by {@code Double.longBitsToDouble(0x7ff0000000000000L)}.

SIZE
enum int SIZE;

The number of bits used to represent a {@code double} value.

Meta