-
Notifications
You must be signed in to change notification settings - Fork 274
Floating-point normalization must not overflow #7617
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
Floating-point normalization must not overflow #7617
Conversation
41c6266
to
8f848b6
Compare
8f848b6
to
9bb815e
Compare
9bb815e
to
4991a69
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #7617 +/- ##
===========================================
- Coverage 78.52% 78.42% -0.10%
===========================================
Files 1674 1674
Lines 191971 191974 +3
===========================================
- Hits 150738 150554 -184
- Misses 41233 41420 +187
... and 14 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
@@ -195,6 +195,7 @@ bvt float_utilst::conversion( | |||
if(dest_spec.e > spec.e) | |||
{ | |||
normalization_shift(result.fraction, result.exponent); | |||
result.exponent.resize(dest_spec.e); |
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.
Can you explain that one?
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.
Comment added.
May I ask you to check whether the world-level flattening implementation in |
We need to extend the exponent to compute a new exponent without overflow; subsequent denormalization and rounding will ensure the exponent fits into the target format. Fixes: diffblue#7616
4991a69
to
5c7c154
Compare
Oh, thank you, indeed! Having put the fix in place makes the regression test pass when using Z3 (or any other SMT back-end that doesn't support FPA). |
We need to extend the exponent to compute a new exponent without
overflow; subsequent denormalization and rounding will ensure the
exponent fits into the target format.
Fixes: #7616