3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

Add GCD test

This commit is contained in:
Nikolaj Bjorner 2020-11-20 11:09:31 -08:00
parent b7b7970c4a
commit 6506d33b35
3 changed files with 46 additions and 5 deletions

View file

@ -387,8 +387,11 @@ public:
}
friend inline std::ostream & operator<<(std::ostream & target, rational const & r) {
target << m().to_string(r.m_val);
return target;
return target << m().to_string(r.m_val);
}
friend inline bool divides(rational const& a, rational const& b) {
return m().divides(a.to_mpq(), b.to_mpq());
}
friend inline rational gcd(rational const & r1, rational const & r2);