mirror of
https://github.com/Z3Prover/z3
synced 2025-06-04 05:11:21 +00:00
MPF min/max -+0.0 special cases changed to +0.0 instead of second argument.
Another piece of fix #68
This commit is contained in:
parent
ee79b1ca9a
commit
49a4df0de1
1 changed files with 10 additions and 2 deletions
|
@ -1229,7 +1229,11 @@ void mpf_manager::rem(mpf const & x, mpf const & y, mpf & o) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void mpf_manager::maximum(mpf const & x, mpf const & y, mpf & o) {
|
void mpf_manager::maximum(mpf const & x, mpf const & y, mpf & o) {
|
||||||
if (is_nan(x) || (is_zero(x) && is_zero(y)))
|
if (is_nan(x))
|
||||||
|
set(o, y);
|
||||||
|
else if (is_zero(x) && is_zero(y) && sgn(x) != sgn(y))
|
||||||
|
mk_pzero(x.ebits, x.sbits, o);
|
||||||
|
else if (is_zero(x) && is_zero(y))
|
||||||
set(o, y);
|
set(o, y);
|
||||||
else if (is_nan(y))
|
else if (is_nan(y))
|
||||||
set(o, x);
|
set(o, x);
|
||||||
|
@ -1240,7 +1244,11 @@ void mpf_manager::maximum(mpf const & x, mpf const & y, mpf & o) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void mpf_manager::minimum(mpf const & x, mpf const & y, mpf & o) {
|
void mpf_manager::minimum(mpf const & x, mpf const & y, mpf & o) {
|
||||||
if (is_nan(x) || (is_zero(x) && is_zero(y)))
|
if (is_nan(x))
|
||||||
|
set(o, y);
|
||||||
|
else if (is_zero(x) && is_zero(y) && sgn(x) != sgn(y))
|
||||||
|
mk_pzero(x.ebits, x.sbits, o);
|
||||||
|
else if (is_zero(x) && is_zero(y))
|
||||||
set(o, y);
|
set(o, y);
|
||||||
else if (is_nan(y))
|
else if (is_nan(y))
|
||||||
set(o, x);
|
set(o, x);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue