3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-23 11:37:54 +00:00

move to interval arithmetic

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-05-07 15:32:56 -07:00
parent 5f48cffbb6
commit e3e2860198
3 changed files with 142 additions and 54 deletions

View file

@ -71,6 +71,25 @@ namespace polysat {
fp.set_bounds(y, 3, 6);
fp.run();
fp.propagate_bounds();
fp.reset();
fp.add_row(x, 3, ys, coeffs);
fp.set_bounds(x, 3, 4);
fp.set_bounds(y, 3, 6);
fp.set_bounds(z, 1, 8);
fp.run();
fp.propagate_bounds();
fp.reset();
}
static void test_interval1() {
interval<uint64_t> i1(1, 2);
interval<uint64_t> i2(3, 6);
std::cout << i1 << " " << i2 << "\n";
std::cout << i1 << " * 4 := " << (i1 * 4) << "\n";
std::cout << i2 << " * 3 := " << (i2 * 3) << "\n";
std::cout << i1 << " * -4 := " << (i1 * (0 - 4)) << "\n";
std::cout << i2 << " * -3 := " << (i2 * (0 - 3)) << "\n";
std::cout << "-" << i2 << " := " << (-i2) << "\n";
}
}
@ -80,4 +99,5 @@ void tst_fixplex() {
polysat::test2();
polysat::test3();
polysat::test4();
polysat::test_interval1();
}