-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
pow impl for u256 #5195
pow impl for u256 #5195
Conversation
This is a duplicate of #4900 |
ad8d233
to
d862af6
Compare
2b60ad9
to
71c5765
Compare
a2f150a
to
d554f71
Compare
@IGI-111 mind reviewing again? I have rebased to the new pow with u32.. |
2d8f20f
to
5095827
Compare
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.
Algorithm looks fine, added functions, everything. I would still rename the exp
/expon
parameters to exponent
for the sake of consistency with other Power
impls.
19a2871
to
0042f71
Compare
Looks like splitting the stdlib for the lsp tests broke the fix. This should pass with it removed. |
Description
This PR is part of #4794 and it implements
pow
for u256. It is using the same algorithm as Rust stdlib https://github.com/rust-lang/rust/blob/193e8a196b7700542473a477effd8c6c5786f8de/library/core/src/num/uint_macros.rs#L1976.#4900 implements
pow
forU256
(upper caseU
) which is being deprecated.Closes #4449
Checklist
Breaking*
orNew Feature
labels where relevant.