#include <coherence/lang/Float64.hpp>
Inherits Primitive< float64_t >, Number, and Comparable.
Public Types | |||||||
typedef spec::Handle | Handle | ||||||
Float64 Handle definition. | |||||||
typedef spec::View | View | ||||||
Float64 View definition. | |||||||
typedef spec::Holder | Holder | ||||||
Float64 Holder definition. | |||||||
Public Member Functions | |||||||
virtual int16_t | getInt16Value () const | ||||||
Return the numeric value of this object as an int16_t. This may involve rounding or truncation.
| |||||||
virtual int32_t | getInt32Value () const | ||||||
Return the numeric value of this object as an int32_t. This may involve rounding or truncation.
| |||||||
virtual int64_t | getInt64Value () const | ||||||
Return the numeric value of this object as an int64_t. This may involve rounding or truncation.
| |||||||
virtual float32_t | getFloat32Value () const | ||||||
Return the numeric value of this object as a float32_t. This may involve rounding.
| |||||||
virtual float64_t | getFloat64Value () const | ||||||
Return the numeric value of this object as a float64_t. This may involve rounding.
| |||||||
virtual int32_t | compareTo (Object::View v) const | ||||||
Compare this object with the specified object for order. Return a negative integer, zero, or a positive integer if this object is less than, equal to, or greater than the specified object. It is strongly recommended, but not strictly required, that
| |||||||
virtual bool | equals (Object::View v) const | ||||||
Return true iff the specified Object is "equal" to this Object. This method implements an equivalence relation on Objects:
The default implementation is a reference equality comparison.
| |||||||
virtual size32_t | hashCode () const | ||||||
Return a hash code value for the Object. This method is supported for the benefit of hash-based containers. The general contract of
The default implementation is identity based.
| |||||||
Static Public Member Functions | |||||||
static uint64_t | float64ToBits (float64_t dfl) | ||||||
Return a uint64_t representation of the specified 64-bit floating point value according to the IEEE 754 floating-point "double format" bit layout. | |||||||
static float64_t | bitsToFloat64 (uint64_t l) | ||||||
Return the float64_t value corresponding to a given bit representation. | |||||||
static Handle | valueOf (float64_t fl) | ||||||
Factory method to produce Float64 objects with an optimization that uses cached objects for all common numbers. | |||||||
static bool | isNaN (float64_t dfl) | ||||||
Test whether the given float64_t is a NaN. | |||||||
static bool | isZero (float64_t dfl) | ||||||
Test whether the given float64_t is -0.0 or 0.0. | |||||||
static bool | isInfinite (float64_t dfl) | ||||||
Test whether the given float64_t is -infinity or +infinity. | |||||||
static int32_t | compare (float64_t dfll, float64_t dflr) | ||||||
Compare the given float32_t values for order. | |||||||
static float64_t | getNaN () | ||||||
Return a constant holding the Not-a-Number (NaN) value of type float64_t . | |||||||
static float64_t | getPositiveInfinity () | ||||||
Return a constant holding the positive infinity value of type float64_t . | |||||||
static float64_t | getNegativeInfinity () | ||||||
Returns a constant holding the negative infinity value of type float64_t . |
static uint64_t float64ToBits | ( | float64_t | dfl | ) | [static] |
Return a uint64_t
representation of the specified 64-bit floating point value according to the IEEE 754 floating-point "double format" bit layout.
dfl | a 64-bit floating-point number |
uint64_t
representation of the floating-point number static float64_t bitsToFloat64 | ( | uint64_t | l | ) | [static] |
Return the float64_t
value corresponding to a given bit representation.
The argument is considered to be a representation of a 64-bit floating-point value according to the IEEE 754 floating-point "double format" bit layout.
l | a 64-bit unsigned integer containing the bit representation of the floating-point number |
float64_t
floating-point value with the same bit pattern. static Handle valueOf | ( | float64_t | fl | ) | [static] |
static bool isNaN | ( | float64_t | dfl | ) | [static] |
Test whether the given float64_t is a NaN.
dfl | a float64_t to test |
static bool isZero | ( | float64_t | dfl | ) | [static] |
Test whether the given float64_t is -0.0 or 0.0.
dfl | a float64_t to test |
static bool isInfinite | ( | float64_t | dfl | ) | [static] |
Test whether the given float64_t is -infinity or +infinity.
dfl | a float64_t to test |
static int32_t compare | ( | float64_t | dfll, | |
float64_t | dflr | |||
) | [static] |
Compare the given float32_t values for order.
Return a negative integer, zero, or a positive integer if the left value is less than, equal to, or greater than the right. The comparison is based on the following order: -infinity < -0.0 < +0.0 < +infinity < NaN
dfll | the left hand value to be compared | |
dflr | the right hand value to be compared |
static float64_t getNaN | ( | ) | [static] |
Return a constant holding the Not-a-Number (NaN) value of type float64_t
.
It is equivalent to the value returned by Float64::bitsToFloat64(((uint64_t) 0x7FF80000) << 32)
.
float64_t
NaN value static float64_t getPositiveInfinity | ( | ) | [static] |
Return a constant holding the positive infinity value of type float64_t
.
It is equal to the value returned by Float64::bitsToFloat64(((uint64_t) 0x7FF00000) << 32)
.
float64_t
positive infinity value static float64_t getNegativeInfinity | ( | ) | [static] |
Returns a constant holding the negative infinity value of type float64_t
.
It is equal to the value returned by Float64::bitsToFloat64(((uint64_t) 0xFFF00000) << 32)
.
float64_t
negative infinity value