mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
Fixed RNA FP rounding mode semantics. Fixes #1190 and bugs reported by Youcheng Sun.
This commit is contained in:
parent
8689921e9c
commit
c3ed986031
2 changed files with 2 additions and 6 deletions
|
@ -2045,7 +2045,7 @@ void mpf_manager::round(mpf_rounding_mode rm, mpf & o) {
|
|||
bool inc = false;
|
||||
switch (rm) {
|
||||
case MPF_ROUND_NEAREST_TEVEN: inc = round && (last || sticky); break;
|
||||
case MPF_ROUND_NEAREST_TAWAY: inc = round && (!last || sticky); break;
|
||||
case MPF_ROUND_NEAREST_TAWAY: inc = round; break;
|
||||
case MPF_ROUND_TOWARD_POSITIVE: inc = (!o.sign && (round || sticky)); break;
|
||||
case MPF_ROUND_TOWARD_NEGATIVE: inc = (o.sign && (round || sticky)); break;
|
||||
case MPF_ROUND_TOWARD_ZERO: inc = false; break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue