diff --git a/include/xsimd/arch/common/xsimd_common_math.hpp b/include/xsimd/arch/common/xsimd_common_math.hpp index cdd35c5dd..10db980e2 100644 --- a/include/xsimd/arch/common/xsimd_common_math.hpp +++ b/include/xsimd/arch/common/xsimd_common_math.hpp @@ -2110,7 +2110,7 @@ namespace xsimd { static constexpr T get(T i, T) { - return i >= N ? (i % 2) : i + N; + return i < N ? (i + N) : ((i % N) + N); } };