File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ constexpr auto floor_log2_pow10(int e) noexcept -> int {
338338}
339339
340340// 128-bit significands of powers of 10 rounded down.
341- // Generated using 192-bit arithmetic method by Dougall Johnson.
341+ // Generation with 192-bit arithmetic and compression by Dougall Johnson.
342342struct pow10_significands_table {
343343 static constexpr bool compress = ZMIJ_OPTIMIZE_SIZE != 0 ;
344344 static constexpr bool split_tables = !compress && ZMIJ_AARCH64 != 0 ;
@@ -404,12 +404,9 @@ struct pow10_significands_table {
404404 uint64_t c1 = h1 + h.hi * m;
405405 uint64_t c2 = (c1 < h1) + umul128_hi64 (h.hi , m);
406406
407- uint128 result;
408- if (c2 >> 63 )
409- result = uint128{c2, c1};
410- else
411- result = uint128{(c2 << 1 ) | (c1 >> 63 ), (c1 << 1 ) | (c0 >> 63 )};
412-
407+ uint128 result = (c2 >> 63 ) != 0
408+ ? uint128{c2, c1}
409+ : uint128{c2 << 1 | c1 >> 63 , c1 << 1 | c0 >> 63 };
413410 result.lo -= (fixups[i >> 5 ] >> (i & 31 )) & 1 ;
414411 return result;
415412 }
You can’t perform that action at this time.
0 commit comments