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)
57 return static_cast<unsigned>(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_