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

[New Hint] UINT256_MUL_DIV_MOD #966

Closed
pefontana opened this issue Apr 13, 2023 · 0 comments · Fixed by #957
Closed

[New Hint] UINT256_MUL_DIV_MOD #966

pefontana opened this issue Apr 13, 2023 · 0 comments · Fixed by #957
Labels
whitelisted-hint Implementation of hint on whitelist directory

Comments

@pefontana
Copy link
Member

pefontana commented Apr 13, 2023

                "a = (ids.a.high << 128) + ids.a.low",
                "b = (ids.b.high << 128) + ids.b.low",
                "div = (ids.div.high << 128) + ids.div.low",
                "quotient, remainder = divmod(a * b, div)",
                "",
                "ids.quotient_low.low = quotient & ((1 << 128) - 1)",
                "ids.quotient_low.high = (quotient >> 128) & ((1 << 128) - 1)",
                "ids.quotient_high.low = (quotient >> 256) & ((1 << 128) - 1)",
                "ids.quotient_high.high = quotient >> 384",
                "ids.remainder.low = remainder & ((1 << 128) - 1)",
                "ids.remainder.high = remainder >> 128"

#957

@pefontana pefontana added the whitelisted-hint Implementation of hint on whitelist directory label Apr 13, 2023
@fmoletta fmoletta linked a pull request Apr 13, 2023 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
whitelisted-hint Implementation of hint on whitelist directory
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant