FP Expressions.
Floating-point expressions.
Definition at line 8693 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 8826 of file z3py.py.
8826 def __div__(self, other):
8827 """Create the Z3 expression `self / other`. 8829 >>> x = FP('x', FPSort(8, 24)) 8830 >>> y = FP('y', FPSort(8, 24)) 8838 [a, b] = _coerce_fp_expr_list([self, other], self.ctx)
8839 return fpDiv(_dflt_rm(), a, b, self.ctx)
def fpDiv(rm, a, b, ctx=None)
Referenced by FPRef.__truediv__().
def __mul__ |
( |
|
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 8785 of file z3py.py.
8785 def __mul__(self, other):
8786 """Create the Z3 expression `self * other`. 8788 >>> x = FP('x', FPSort(8, 24)) 8789 >>> y = FP('y', FPSort(8, 24)) 8797 [a, b] = _coerce_fp_expr_list([self, other], self.ctx)
8798 return fpMul(_dflt_rm(), a, b, self.ctx)
def fpMul(rm, a, b, ctx=None)
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 8841 of file z3py.py.
8841 def __rdiv__(self, other):
8842 """Create the Z3 expression `other / self`. 8844 >>> x = FP('x', FPSort(8, 24)) 8845 >>> y = FP('y', FPSort(8, 24)) 8851 [a, b] = _coerce_fp_expr_list([other, self], self.ctx)
8852 return fpDiv(_dflt_rm(), a, b, self.ctx)
def fpDiv(rm, a, b, ctx=None)
Referenced by FPRef.__rtruediv__().
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 8696 of file z3py.py.
8697 """Return the sort of the floating-point expression `self`. 8699 >>> x = FP('1.0', FPSort(8, 24)) 8702 >>> x.sort() == FPSort(8, 24) 8705 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.