mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
bug fixes to LUT extraction, bug fix for real value case of freedom intervals
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
806ee85759
commit
c46e36ce58
9 changed files with 38 additions and 17 deletions
|
@ -513,12 +513,12 @@ bool int_solver::shift_var(unsigned j, unsigned range) {
|
|||
}
|
||||
|
||||
SASSERT(!inf_l && !inf_u);
|
||||
mpq r = floor((u.x - l.x) / m);
|
||||
mpq r = floor((u - l) / m);
|
||||
if (r < mpq(range)) range = static_cast<unsigned>(r.get_uint64());
|
||||
// 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 - l) / 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue