mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
Bugfix for special-case handling in fp.fma.
Thanks to Florian Schanda for reporting this bug. (+reversed accidental debug code commit).
This commit is contained in:
parent
56b1a8b086
commit
16b32ecf12
2 changed files with 24 additions and 24 deletions
|
@ -795,8 +795,9 @@ void mpf_manager::fma(mpf_rounding_mode rm, mpf const & x, mpf const & y, mpf co
|
|||
set(o, z);
|
||||
}
|
||||
else if (is_zero(x) || is_zero(y)) {
|
||||
if (is_zero(z) && rm != MPF_ROUND_TOWARD_NEGATIVE)
|
||||
mk_pzero(x.ebits, x.sbits, o);
|
||||
bool xy_sgn = is_neg(x) ^ is_neg(y);
|
||||
if (is_zero(z) && xy_sgn ^ is_neg(z))
|
||||
mk_zero(x.ebits, x.sbits, rm != MPF_ROUND_TOWARD_NEGATIVE, o);
|
||||
else
|
||||
set(o, z);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue