Skip to content

allow compiler >=0.8.0 #1030

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

Closed
wants to merge 1 commit into from
Closed

allow compiler >=0.8.0 #1030

wants to merge 1 commit into from

Conversation

Mathacc
Copy link

@Mathacc Mathacc commented Feb 14, 2025

This PR updates the computation of the largest power of two divisor of the denominator in the mulDiv function. It replaces:

uint256 twos = -denominator & denominator;

with

uint256 twos = denominator & (~denominator + 1);

The new expression is equivalent to the original but uses an explicit two's complement computation, improving code clarity and readability.

All tests pass, and the change does not alter the functionality of the code.
Also allows the compilation for compilers above 0.8.0

Copy link

stale bot commented Apr 15, 2025

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Apr 15, 2025
@Mathacc
Copy link
Author

Mathacc commented Apr 15, 2025

yes, it is relevant still, when I compile from a compiler >8.0.0 I always have to change it locally

@stale stale bot removed the wontfix label Apr 15, 2025
Copy link

stale bot commented Jun 14, 2025

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Jun 14, 2025
@stale stale bot closed this Jun 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant