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 right shift on negative BigInts #20585

Merged
merged 1 commit into from
Jul 12, 2024
Merged

Conversation

tau-dev
Copy link
Contributor

@tau-dev tau-dev commented Jul 11, 2024

Closes #17662.

To replicate two's-complement right shift behavior, we need to correct our sign-magnitude representation by one when right shifting out bits from a negative number.

@andrewrk andrewrk merged commit 2b99b04 into ziglang:master Jul 12, 2024
10 checks passed
@tau-dev tau-dev deleted the fix-bigint-rshift branch July 12, 2024 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants