diff --git a/include/libcommute/loperator/monomial_action_fermion.hpp b/include/libcommute/loperator/monomial_action_fermion.hpp index 0a19ed8..31b8bb0 100644 --- a/include/libcommute/loperator/monomial_action_fermion.hpp +++ b/include/libcommute/loperator/monomial_action_fermion.hpp @@ -103,7 +103,7 @@ template <> class monomial_action { // Compute parity of the number of set bits in i inline static bool parity_popcount(sv_index_type i) { #if defined(__GNUC__) || defined(__clang__) - return __builtin_popcountll(i) & 0x01; + return __builtin_parityll(i); #else i ^= i >> 32; i ^= i >> 16; @@ -111,7 +111,7 @@ template <> class monomial_action { i ^= i >> 4; i ^= i >> 2; i ^= i >> 1; - return i & 0x01; + return i & 0x1; #endif }