fixup! Clean-up sign-conversion warnings in implementation code

This commit is contained in:
Florin Iucha 2019-12-01 13:16:17 -05:00
parent 69bd245b71
commit 10960ee842

View File

@ -482,8 +482,7 @@ inline fp operator*(fp x, fp y) { return {multiply(x.f, y.f), x.e + y.e + 64}; }
FMT_FUNC fp get_cached_power(int min_exponent, int& pow10_exponent) {
const uint64_t one_over_log2_10 = 0x4d104d42; // round(pow(2, 32) / log2(10))
int index = static_cast<int>(
static_cast<int64_t>(
static_cast<uint64_t>(min_exponent + fp::significand_size - 1) * one_over_log2_10 +
(static_cast<uint64_t>(min_exponent + fp::significand_size - 1) * one_over_log2_10 +
((1ULL << 32) - 1) // ceil
) >>
32 // arithmetic shift