mirror of
https://github.com/Z3Prover/z3
synced 2025-06-06 14:13:23 +00:00
issue #48 disabled rounding for strict real inequalities
This commit is contained in:
parent
ade9b2830a
commit
1cf24f7cdc
2 changed files with 4 additions and 0 deletions
|
@ -733,6 +733,8 @@ void iz3mgr::linear_comb(ast &P, const ast &c, const ast &Q, bool round_off){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool pstrict = op(P) == Lt;
|
bool pstrict = op(P) == Lt;
|
||||||
|
if (round_off && get_type(Qrhs) != int_type())
|
||||||
|
round_off = false;
|
||||||
if(qstrict && round_off && (pstrict || !(c == make_int(rational(1))))){
|
if(qstrict && round_off && (pstrict || !(c == make_int(rational(1))))){
|
||||||
Qrhs = make(Sub,Qrhs,make_int(rational(1)));
|
Qrhs = make(Sub,Qrhs,make_int(rational(1)));
|
||||||
qstrict = false;
|
qstrict = false;
|
||||||
|
|
|
@ -2584,6 +2584,8 @@ class iz3proof_itp_impl : public iz3proof_itp {
|
||||||
if(pstrict && qstrict && round_off)
|
if(pstrict && qstrict && round_off)
|
||||||
Qrhs = make(Sub,Qrhs,make_int(rational(1)));
|
Qrhs = make(Sub,Qrhs,make_int(rational(1)));
|
||||||
#else
|
#else
|
||||||
|
if (round_off && get_type(Qrhs) != int_type())
|
||||||
|
round_off = false;
|
||||||
bool pstrict = op(P) == Lt;
|
bool pstrict = op(P) == Lt;
|
||||||
if(qstrict && round_off && (pstrict || !(c == make_int(rational(1))))){
|
if(qstrict && round_off && (pstrict || !(c == make_int(rational(1))))){
|
||||||
Qrhs = make(Sub,Qrhs,make_int(rational(1)));
|
Qrhs = make(Sub,Qrhs,make_int(rational(1)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue