15 #ifndef RAPIDJSON_IEEE754_ 16 #define RAPIDJSON_IEEE754_ 18 #include "../rapidjson.h" 37 bool Sign()
const {
return (
u_ & kSignMask) != 0; }
39 int Exponent()
const {
return static_cast<int>(((
u_ & kExponentMask) >> kSignificandSize) - kExponentBias); }
43 bool IsNanOrInf()
const {
return (
u_ & kExponentMask) == kExponentMask; }
45 bool IsZero()
const {
return (
u_ & (kExponentMask | kSignificandMask)) == 0; }
54 else if (order <= -1074)
61 static const int kSignificandSize = 52;
62 static const int kExponentBias = 0x3FF;
63 static const int kDenormalExponent = 1 - kExponentBias;
78 #endif // RAPIDJSON_IEEE754_
uint64_t Significand() const
uint64_t Uint64Value() const
#define RAPIDJSON_UINT64_C2(high32, low32)
Construct a 64-bit literal by a pair of 32-bit integer.
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
static int EffectiveSignificandSize(int order)
double NextPositiveDouble() const
int IntegerExponent() const
unsigned __int64 uint64_t
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
uint64_t IntegerSignificand() const
#define RAPIDJSON_ASSERT(x)
Assertion.