mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
Add more PDD utilities (div, pow) (#5180)
* Expose 'inv' on rationals to get reciprocal value * Align parameter names with implementation * Add cached operation that divides PDD by a constant * Fix display for constant PDDs * operator^ should probably call ^ instead of + (mk_xor instead of add) * Add helper function 'pow' on PDDs
This commit is contained in:
parent
2f7069a8b7
commit
324d9ed461
5 changed files with 146 additions and 20 deletions
|
@ -157,6 +157,12 @@ public:
|
|||
friend inline rational numerator(rational const & r) { rational result; m().get_numerator(r.m_val, result.m_val); return result; }
|
||||
|
||||
friend inline rational denominator(rational const & r) { rational result; m().get_denominator(r.m_val, result.m_val); return result; }
|
||||
|
||||
friend inline rational inv(rational const & r) {
|
||||
rational result;
|
||||
m().inv(r.m_val, result.m_val);
|
||||
return result;
|
||||
}
|
||||
|
||||
rational & operator+=(rational const & r) {
|
||||
m().add(m_val, r.m_val, m_val);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue