RAPIDJSON_DIAG_OFF(effc++)
40RAPIDJSON_DIAG_OFF(padded)
54 intbiased_e =
static_cast<int>((u.u64 & kDpExponentMask) >> kDpSignificandSize);
55 uint64_tsignificand = (u.u64 & kDpSignificandMask);
57 f= significand + kDpHiddenBit;
58e = biased_e - kDpExponentBias;
62e = kDpMinExponent + 1;
71 #if defined(_MSC_VER) && defined(_M_AMD64) 76 return DiyFp(h, e + rhs.
e+ 64);
77 #elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__x86_64__) 78__extension__
typedef unsigned__int128
uint128;
84 return DiyFp(h, e + rhs.
e+ 64);
95 uint64_t tmp= (bd >> 32) + (ad & M32) + (bc & M32);
97 return DiyFp(ac + (ad >> 32) + (bc >> 32) + (
tmp>> 32), e + rhs.
e+ 64);
102 #if defined(_MSC_VER) && defined(_M_AMD64) 104_BitScanReverse64(&index,
f);
105 return DiyFp(
f<< (63 - index), e - (63 - index));
106 #elif defined(__GNUC__) && __GNUC__ >= 4 107 ints = __builtin_clzll(
f);
108 return DiyFp(
f<< s, e - s);
111 while(!(res.
f& (
static_cast<uint64_t>(1) << 63))) {
121 while(!(res.
f& (kDpHiddenBit << 1))) {
125res.
f<<= (kDiySignificandSize - kDpSignificandSize - 2);
126res.
e= res.
e- (kDiySignificandSize - kDpSignificandSize - 2);
132 DiyFpmi = (
f== kDpHiddenBit) ?
DiyFp((
f<< 2) - 1, e - 2) :
DiyFp((
f<< 1) - 1, e - 1);
133mi.
f<<= mi.
e- pl.
e;
144 const uint64_tbe = (e == kDpDenormalExponent && (
f& kDpHiddenBit) == 0) ? 0 :
145 static_cast<uint64_t>(e + kDpExponentBias);
146u.u64 = (
f& kDpSignificandMask) | (be << kDpSignificandSize);
150 static const intkDiySignificandSize = 64;
151 static const intkDpSignificandSize = 52;
152 static const intkDpExponentBias = 0x3FF + kDpSignificandSize;
153 static const intkDpMaxExponent = 0x7FF - kDpExponentBias;
154 static const intkDpMinExponent = -kDpExponentBias;
155 static const intkDpDenormalExponent = -kDpExponentBias + 1;
166 static const uint64_tkCachedPowers_F[] = {
212 static const int16_tkCachedPowers_E[] = {
213-1220, -1193, -1166, -1140, -1113, -1087, -1060, -1034, -1007, -980,
214-954, -927, -901, -874, -847, -821, -794, -768, -741, -715,
215-688, -661, -635, -608, -582, -555, -529, -502, -475, -449,
216-422, -396, -369, -343, -316, -289, -263, -236, -210, -183,
217-157, -130, -103, -77, -50, -24, 3, 30, 56, 83,
218109, 136, 162, 189, 216, 242, 269, 295, 322, 348,
219375, 402, 428, 455, 481, 508, 534, 561, 588, 614,
220641, 667, 694, 720, 747, 774, 800, 827, 853, 880,
221907, 933, 960, 986, 1013, 1039, 1066
223 return DiyFp(kCachedPowers_F[index], kCachedPowers_E[index]);
229 doubledk = (-61 - e) * 0.30102999566398114 + 347;
230 intk =
static_cast<int>(dk);
234 unsignedindex =
static_cast<unsigned>((k >> 3) + 1);
235*K = -(-348 +
static_cast<int>(index << 3));
241 unsignedindex = (
static_cast<unsigned>(exp) + 348u) / 8u;
242*outExp = -348 +
static_cast<int>(index) * 8;
252RAPIDJSON_DIAG_OFF(padded)
std::pair< uint64, uint64 > uint128
#define RAPIDJSON_NAMESPACE_BEGIN
provide custom rapidjson namespace (opening expression)
#define RAPIDJSON_NAMESPACE_END
provide custom rapidjson namespace (closing expression)
DiyFp GetCachedPower10(int exp, int *outExp)
DiyFp GetCachedPowerByIndex(size_t index)
DiyFp GetCachedPower(int e, int *K)
#define RAPIDJSON_UINT64_C2(high32, low32)
Construct a 64-bit literal by a pair of 32-bit integer.
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
DiyFp(uint64_t fp, int exp)
DiyFp operator-(const DiyFp &rhs) const
DiyFp NormalizeBoundary() const
void NormalizedBoundaries(DiyFp *minus, DiyFp *plus) const
DiyFp operator*(const DiyFp &rhs) const
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4