Skip to content

Commit

Permalink
Try to align the amount of shift to 8-bit boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
jk-jeon committed Apr 26, 2024
1 parent 85c6e7f commit 015bf3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/dragonbox/dragonbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ namespace jkj {
// smallest magic number for this computation does not fit into 64-bits.
else JKJ_IF_CONSTEXPR(stdr::is_same<UInt, stdr::uint_least64_t>::value && N == 3 &&
n_max <= UINT64_C(15534100272597517998)) {
return UInt(wuint::umul128_upper64(n, UINT64_C(2361183241434822607)) >> 7);
return UInt(wuint::umul128_upper64(n, UINT64_C(4722366482869645214)) >> 8);
}
else {
constexpr auto divisor = compute_power<N>(UInt(10));
Expand Down

0 comments on commit 015bf3d

Please sign in to comment.