diff --git a/include/hyperloglog.hpp b/include/hyperloglog.hpp index 93bbdc7..712466d 100755 --- a/include/hyperloglog.hpp +++ b/include/hyperloglog.hpp @@ -147,7 +147,7 @@ class HyperLogLog { } for (uint32_t r = 0; r < m_; ++r) { if (M_[r] < other.M_[r]) { - M_[r] = other.M_[r]; + M_[r] |= other.M_[r]; } } } @@ -289,7 +289,7 @@ class HyperLogLogHIP : public HyperLogLog { if (b < b_other) { c_ += 1.0 / (p_/m_); p_ -= 1.0/(1 << b); - M_[r] = b_other; + M_[r] |= b_other; if(b_other < register_limit_){ p_ += 1.0/(1 << b_other); }