Public Member Functions | |
def | approx |
def | as_decimal |
![]() | |
def | sort |
def | is_int |
def | is_real |
def | __add__ |
def | __radd__ |
def | __mul__ |
def | __rmul__ |
def | __sub__ |
def | __rsub__ |
def | __pow__ |
def | __rpow__ |
def | __div__ |
def | __truediv__ |
def | __rdiv__ |
def | __rtruediv__ |
def | __mod__ |
def | __rmod__ |
def | __neg__ |
def | __pos__ |
def | __le__ |
def | __lt__ |
def | __gt__ |
def | __ge__ |
![]() | |
def | as_ast |
def | get_id |
def | sort |
def | sort_kind |
def | __eq__ |
def | __hash__ |
def | __ne__ |
def | params |
def | decl |
def | num_args |
def | arg |
def | children |
![]() | |
def | __init__ |
def | __del__ |
def | __deepcopy__ |
def | __str__ |
def | __repr__ |
def | __eq__ |
def | __hash__ |
def | __nonzero__ |
def | __bool__ |
def | sexpr |
def | as_ast |
def | get_id |
def | ctx_ref |
def | eq |
def | translate |
def | __copy__ |
def | hash |
![]() | |
def | use_pp |
Additional Inherited Members | |
![]() | |
ast | |
ctx | |
def approx | ( | self, | |
precision = 10 |
|||
) |
Return a Z3 rational number that approximates the algebraic number `self`. The result `r` is such that |r - self| <= 1/10^precision >>> x = simplify(Sqrt(2)) >>> x.approx(20) 6838717160008073720548335/4835703278458516698824704 >>> x.approx(5) 2965821/2097152
Definition at line 2856 of file z3py.py.
def as_decimal | ( | self, | |
prec | |||
) |
Return a string representation of the algebraic number `self` in decimal notation using `prec` decimal places >>> x = simplify(Sqrt(2)) >>> x.as_decimal(10) '1.4142135623?' >>> x.as_decimal(20) '1.41421356237309504880?'
Definition at line 2867 of file z3py.py.