From 110451781e7e21ffa4d48ceec35af55d1809b1dc Mon Sep 17 00:00:00 2001 From: Kim Walisch Date: Mon, 8 Jul 2024 09:54:55 +0200 Subject: [PATCH] Add uint64_t cast --- include/fast_div.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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