Floating-point expressions.
Definition at line 9613 of file z3py.py.
def __div__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
Create the Z3 expression `self / other`.
>>> x = FP('x', FPSort(8, 24))
>>> y = FP('y', FPSort(8, 24))
>>> x / y
x / y
>>> (x / y).sort()
FPSort(8, 24)
>>> 10 / y
1.25*(2**3) / y
Definition at line 9746 of file z3py.py.
9746 def __div__(self, other):
9747 """Create the Z3 expression `self / other`.
9749 >>> x = FP('x', FPSort(8, 24))
9750 >>> y = FP('y', FPSort(8, 24))
9758 [a, b] = _coerce_fp_expr_list([self, other], self.ctx)
9759 return fpDiv(_dflt_rm(), a, b, self.ctx)
def fpDiv(rm, a, b, ctx=None)
Referenced by ArithRef.__truediv__(), BitVecRef.__truediv__(), and FPRef.__truediv__().
def __rdiv__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
Create the Z3 expression `other / self`.
>>> x = FP('x', FPSort(8, 24))
>>> y = FP('y', FPSort(8, 24))
>>> x / y
x / y
>>> x / 10
x / 1.25*(2**3)
Definition at line 9761 of file z3py.py.
9761 def __rdiv__(self, other):
9762 """Create the Z3 expression `other / self`.
9764 >>> x = FP('x', FPSort(8, 24))
9765 >>> y = FP('y', FPSort(8, 24))
9771 [a, b] = _coerce_fp_expr_list([other, self], self.ctx)
9772 return fpDiv(_dflt_rm(), a, b, self.ctx)
Referenced by ArithRef.__rtruediv__(), BitVecRef.__rtruediv__(), and FPRef.__rtruediv__().
def __sub__ |
( |
|
self, |
|
|
|
other |
|
) |
| |
Create the Z3 expression `self - other`.
>>> x = FP('x', FPSort(8, 24))
>>> y = FP('y', FPSort(8, 24))
>>> x - y
x - y
>>> (x - y).sort()
FPSort(8, 24)
Definition at line 9682 of file z3py.py.
9682 def __sub__(self, other):
9683 """Create the Z3 expression `self - other`.
9685 >>> x = FP('x', FPSort(8, 24))
9686 >>> y = FP('y', FPSort(8, 24))
9692 [a, b] = _coerce_fp_expr_list([self, other], self.ctx)
9693 return fpSub(_dflt_rm(), a, b, self.ctx)
Return the sort of the floating-point expression `self`.
>>> x = FP('1.0', FPSort(8, 24))
>>> x.sort()
FPSort(8, 24)
>>> x.sort() == FPSort(8, 24)
True
Reimplemented from ExprRef.
Definition at line 9616 of file z3py.py.
9617 """Return the sort of the floating-point expression `self`.
9619 >>> x = FP('1.0', FPSort(8, 24))
9622 >>> x.sort() == FPSort(8, 24)
9625 return FPSortRef(
Z3_get_sort(self.ctx_ref(), self.as_ast()), self.ctx)
Z3_sort Z3_API Z3_get_sort(Z3_context c, Z3_ast a)
Return the sort of an AST node.
Referenced by FPNumRef.as_string(), ArrayRef.domain(), ArrayRef.domain_n(), FPRef.ebits(), ArithRef.is_int(), ArithRef.is_real(), ArrayRef.range(), FPRef.sbits(), BitVecRef.size(), and ExprRef.sort_kind().