18 #ifndef _DECAF_LANG_DOUBLE_H_
19 #define _DECAF_LANG_DOUBLE_H_
40 static const int SIZE = 64;
49 static const double NaN;
77 Double(
const std::string& value );
89 virtual int compareTo(
const Double& d )
const;
96 return this->value == d.value;
105 return this->value == d.value;
115 return this->value < d.value;
126 virtual int compareTo(
const double& d )
const;
133 return this->value == d;
142 return this->value == d;
152 return this->value < d;
158 std::string toString()
const;
173 return (
float)this->value;
181 return (
unsigned char)this->value;
189 return (
short)this->value;
197 return (
int)this->value;
205 return (
long long)this->value;
211 bool isInfinite()
const;
231 static int compare(
double d1,
double d2 );
255 static long long doubleToLongBits(
double value );
282 static long long doubleToRawLongBits(
double value );
288 static bool isInfinite(
double value );
294 static bool isNaN(
double value );
312 static double longBitsToDouble(
long long bits );
321 static double parseDouble(
const std::string value );
357 static std::string toHexString(
double value );
390 static std::string toString(
double value );
397 static Double valueOf(
double value );
406 static Double valueOf(
const std::string& value );
410 static const long long DOUBLE_SIGN_MASK = 0x8000000000000000LL;
411 static const long long DOUBLE_EXPONENT_MASK = 0x7FF0000000000000LL;
412 static const long long DOUBLE_MANTISSA_MASK = 0x000FFFFFFFFFFFFFLL;
413 static const long long DOUBLE_NAN_BITS =
414 DOUBLE_EXPONENT_MASK | 0x0008000000000000LL;