mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 02:45:51 +00:00
access polynomial expressions from algebraic numerals
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
a6a041ec5d
commit
e1d2b88a82
2 changed files with 12 additions and 8 deletions
|
@ -2921,6 +2921,12 @@ class AlgebraicNumRef(ArithRef):
|
|||
"""
|
||||
return Z3_get_numeral_decimal_string(self.ctx_ref(), self.as_ast(), prec)
|
||||
|
||||
def poly(self):
|
||||
return AstVector(Z3_algebraic_get_poly(self.ctx_ref(), self.as_ast()), self.ctx)
|
||||
|
||||
def index(self):
|
||||
return Z3_algebraic_get_i(self.ctx_ref(), self.as_ast())
|
||||
|
||||
def _py2expr(a, ctx=None):
|
||||
if isinstance(a, bool):
|
||||
return BoolVal(a, ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue