summaryrefslogtreecommitdiffstats
path: root/xmrstak/rapidjson/internal/diyfp.h
diff options
context:
space:
mode:
authorfireice-uk <fireice-uk@users.noreply.github.com>2018-05-30 21:18:45 +0100
committerGitHub <noreply@github.com>2018-05-30 21:18:45 +0100
commitc0ab1734332d6472225d8ac7394f6fcba71aabc9 (patch)
treeb53a4c37905a0cb5dfa6a66f514cf3dc1ea94a21 /xmrstak/rapidjson/internal/diyfp.h
parent26a5d65f12b2f19a0a3ece39a2bc64718796367b (diff)
parent4f34bd18024fa71a8cab81d5a0b86cf5c7d9370e (diff)
downloadxmr-stak-2.4.4.zip
xmr-stak-2.4.4.tar.gz
Merge pull request #1610 from fireice-uk/dev2.4.4
release 2.4.4
Diffstat (limited to 'xmrstak/rapidjson/internal/diyfp.h')
-rw-r--r--xmrstak/rapidjson/internal/diyfp.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/xmrstak/rapidjson/internal/diyfp.h b/xmrstak/rapidjson/internal/diyfp.h
index c9fefdc..71a6d02 100644
--- a/xmrstak/rapidjson/internal/diyfp.h
+++ b/xmrstak/rapidjson/internal/diyfp.h
@@ -1,5 +1,5 @@
// Tencent is pleased to support the open source community by making RapidJSON available.
-//
+//
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.
//
// Licensed under the MIT License (the "License"); you may not use this file except
@@ -7,9 +7,9 @@
//
// http://opensource.org/licenses/MIT
//
-// Unless required by applicable law or agreed to in writing, software distributed
-// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-// CONDITIONS OF ANY KIND, either express or implied. See the License for the
+// Unless required by applicable law or agreed to in writing, software distributed
+// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
// This is a C++ header-only implementation of Grisu2 algorithm from the publication:
@@ -56,7 +56,7 @@ struct DiyFp {
if (biased_e != 0) {
f = significand + kDpHiddenBit;
e = biased_e - kDpExponentBias;
- }
+ }
else {
f = significand;
e = kDpMinExponent + 1;
@@ -141,7 +141,7 @@ struct DiyFp {
double d;
uint64_t u64;
}u;
- const uint64_t be = (e == kDpDenormalExponent && (f & kDpHiddenBit) == 0) ? 0 :
+ const uint64_t be = (e == kDpDenormalExponent && (f & kDpHiddenBit) == 0) ? 0 :
static_cast<uint64_t>(e + kDpExponentBias);
u.u64 = (f & kDpSignificandMask) | (be << kDpSignificandSize);
return u.d;
@@ -222,7 +222,7 @@ inline DiyFp GetCachedPowerByIndex(size_t index) {
};
return DiyFp(kCachedPowers_F[index], kCachedPowers_E[index]);
}
-
+
inline DiyFp GetCachedPower(int e, int* K) {
//int k = static_cast<int>(ceil((-61 - e) * 0.30102999566398114)) + 374;
OpenPOWER on IntegriCloud