Skip to content

Commit

Permalink
Add uint64_t cast
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwalisch committed Jul 8, 2024
1 parent 1de7287 commit 1104517
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fast_div.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ALWAYS_INLINE uint64_t fast_div_240(uint64_t x)
return __umulh(x, 9838263505978427529ull) >> 7;
#elif defined(HAVE_INT128_T)
using namespace primecount;
return ((x * uint128_t(9838263505978427529ull)) >> 64) >> 7;
return uint64_t((x * uint128_t(9838263505978427529ull)) >> 64) >> 7;
#else
return x / 240;
#endif
Expand Down

0 comments on commit 1104517

Please sign in to comment.