Skip to content
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

fix: modify overflowing_shr to fix overflow check #347

Merged
merged 5 commits into from
Feb 27, 2024

Conversation

tcoratger
Copy link
Contributor

Motivation

overflowing_shr algorithm seems to give incorrect overflow results: #337.

Should close #337.

Solution

  • Added code to evaluate overflow for shift operation.
  • This addition enables the identification of a floating-point outcome by isolating the most significant bit of the shifted limb.
  • If the least significant bit of the shifted limb is non-zero, overflow is set to true, indicating a floating-point result.
  • Enhances the functionality of the overflowing_shr function to differentiate between floating-point and integer outcomes after the shift operation.

This enhancement improves the functionality of the overflowing_shr method, providing a mechanism to determine whether the result represents a floating-point or integer value.

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

@tcoratger tcoratger changed the title fix: modify overflowing_shr to fix overflow check fix: modify overflowing_shr to fix overflow check Jan 3, 2024
Copy link

codecov bot commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.57%. Comparing base (4f2b31d) to head (c9f9fa4).

❗ Current head c9f9fa4 differs from pull request most recent head 0e515e0. Consider uploading reports for the commit 0e515e0 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #347      +/-   ##
==========================================
+ Coverage   79.45%   79.57%   +0.12%     
==========================================
  Files          55       55              
  Lines        5578     5666      +88     
==========================================
+ Hits         4432     4509      +77     
- Misses       1146     1157      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@prestwich prestwich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edited the changelog to move the line to the unreleased section.

@prestwich prestwich merged commit f81baa3 into recmo:main Feb 27, 2024
18 checks passed
@prestwich
Copy link
Collaborator

this change has been published in v1.12.0 thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

overflowing_shr result is incorrect
2 participants