mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
commit
b60f30c802
13 changed files with 283 additions and 57 deletions
|
@ -1250,12 +1250,13 @@ void mpf_manager::rem(mpf const & x, mpf const & y, mpf & o) {
|
|||
void mpf_manager::maximum(mpf const & x, mpf const & y, mpf & o) {
|
||||
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);
|
||||
else if (is_nan(y))
|
||||
set(o, x);
|
||||
else if (is_zero(x) && is_zero(y) && sgn(x) != sgn(y)) {
|
||||
UNREACHABLE(); // max(+0, -0) and max(-0, +0) are unspecified.
|
||||
}
|
||||
else if (is_zero(x) && is_zero(y))
|
||||
set(o, y);
|
||||
else if (gt(x, y))
|
||||
set(o, x);
|
||||
else
|
||||
|
@ -1265,12 +1266,13 @@ void mpf_manager::maximum(mpf const & x, mpf const & y, mpf & o) {
|
|||
void mpf_manager::minimum(mpf const & x, mpf const & y, mpf & o) {
|
||||
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);
|
||||
else if (is_nan(y))
|
||||
set(o, x);
|
||||
else if (is_zero(x) && is_zero(y) && sgn(x) != sgn(y)) {
|
||||
UNREACHABLE(); // min(+0, -0) and min(-0, +0) are unspecified.
|
||||
}
|
||||
else if (is_zero(x) && is_zero(y))
|
||||
set(o, y);
|
||||
else if (lt(x, y))
|
||||
set(o, x);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue