-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add IEEE 754 TiesToAway rounding mode #8515
Conversation
278c8af
to
5e5f9ee
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8515 +/- ##
===========================================
- Coverage 79.60% 79.14% -0.46%
===========================================
Files 1733 1733
Lines 197358 198512 +1154
Branches 18165 18173 +8
===========================================
+ Hits 157111 157119 +8
- Misses 40247 41393 +1146 ☔ View full report in Codecov by Sentry. |
6f246fe
to
5de7b26
Compare
7849525
to
e4647d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except the below piece that I believe to be wrong.
src/solvers/smt2/smt2_conv.cpp
Outdated
// TODO: add some kind of error checking here | ||
out << "roundTowardZero"; | ||
out << "roundTowardAway"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be RoundNearestTiesToAway
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, fixed.
This adds IEEE 754 TiesToAway rounding mode, which rounds away from zero in case of a tie. The rounding mode is added to three distinct implementations: 1. The implementation for constants, in util/ieee_float.h 2. The implementation that creates a bit-level encoding, in src/solvers/floatbv/float_utils.h. 3. The implementation that creates a word-level encoding, in solvers/floatbv/float_bv.cpp.
This adds IEEE 754 TiesToAway rounding mode, which rounds away from zero in case of a tie.