mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
fix division by 0
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
f6dd6a38cd
commit
988a46dbc4
1 changed files with 3 additions and 0 deletions
|
@ -1826,6 +1826,9 @@ namespace sls {
|
|||
|
||||
auto x0 = div(a, num_t(k));
|
||||
|
||||
if (x0 == 0)
|
||||
return x0;
|
||||
|
||||
auto x1 = div((x0 * num_t(k - 1)) + div(a, power_of(x0, k - 1)), num_t(k));
|
||||
|
||||
while (x1 < x0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue