3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 02:45:51 +00:00

Add support for compact string representation in the RCF API

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-01-14 11:08:32 -08:00
parent 6c35e08e43
commit 742f2b07dd
5 changed files with 18 additions and 12 deletions

View file

@ -65,7 +65,10 @@ class RCFNum:
return self.ctx.ref()
def __repr__(self):
return Z3_rcf_num_to_string(self.ctx_ref(), self.num)
return Z3_rcf_num_to_string(self.ctx_ref(), self.num, False)
def compact_str(self):
return Z3_rcf_num_to_string(self.ctx_ref(), self.num, True)
def __add__(self, other):
v = _to_rcfnum(other, self.ctx)