diff --git a/include/fast_div.hpp b/include/fast_div.hpp index 3adab8b6..8317f2d8 100644 --- a/include/fast_div.hpp +++ b/include/fast_div.hpp @@ -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