3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-07 18:05:21 +00:00

make the column shift in random_update divisible by m

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2020-02-09 16:30:09 -08:00
parent bc75e08a52
commit fd3c3a2599

View file

@ -517,7 +517,7 @@ bool int_solver::shift_var(unsigned j, unsigned range) {
// the interval contains at least range multiples of m.
// the number of multiples to the left of the value of j is floor((get_value(j) - l.x)/m)
// shift either left or right of the current value by available multiples.
impq shift = impq(random() % (range + 1)) - impq(floor(x.x - l.x) / m);
impq shift = impq(random() % (range + 1)) - impq(floor((x.x - l.x) / m));
impq new_val = x + m * shift;
SASSERT(l <= new_val && new_val <= u);
set_value_for_nbasic_column_ignore_old_values(j, new_val); return true;