mirror of
https://github.com/Z3Prover/z3
synced 2026-02-14 04:41:48 +00:00
Modify behavior for division by zero
Allow division by zero in z3 expressions without raising an error.
This commit is contained in:
parent
dcbafa9442
commit
8077e3d031
1 changed files with 1 additions and 1 deletions
|
|
@ -3375,7 +3375,7 @@ def RatVal(a, b, ctx=None):
|
|||
_z3_assert(_is_int(a) or isinstance(a, str), "First argument cannot be converted into an integer")
|
||||
_z3_assert(_is_int(b) or isinstance(b, str), "Second argument cannot be converted into an integer")
|
||||
if b == 0:
|
||||
raise ValueError("Denominator cannot be zero")
|
||||
pass # division by 0 is legal in z3 expressions.
|
||||
return simplify(RealVal(a, ctx) / RealVal(b, ctx))
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue