From 38ad66ce170050d114050c3ad4f8c8e843aea85e Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Tue, 24 Sep 2019 12:31:23 -0700 Subject: [PATCH] update hash #2579 Signed-off-by: Nikolaj Bjorner --- src/util/mpq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/mpq.h b/src/util/mpq.h index ac96b8b7c..db38d87b7 100644 --- a/src/util/mpq.h +++ b/src/util/mpq.h @@ -521,7 +521,7 @@ public: static unsigned hash(mpz const & a) { return mpz_manager::hash(a); } - static unsigned hash(mpq const & a) { return hash(a.m_num); } + static unsigned hash(mpq const & a) { return hash(a.m_num) + 3*hash(a.m_den); } bool eq(mpz const & a, mpz const & b) { return mpz_manager::eq(a, b); }