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

EIP-198 implement a precompile for modular exponentiation #920

Merged
merged 5 commits into from
Aug 22, 2017

Conversation

mkalinin
Copy link
Contributor

Implementation of EIP 198: ethereum/EIPs#198

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 57.687% when pulling 67f341d on eip-198 into 4f97f27 on develop.


private long getMultComplexity(long x) {

long x2 = (long) Math.pow(x, 2);
Copy link
Member

Choose a reason for hiding this comment

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

x * x should be used here. Math.pow() is double function and may return incompatible result on large numbers
E.g. Integer.MAX_VALUE * Integer.MAX_VALUE != Math.pow(Integer.MAX_VALUE, 2)
It will still end up in OOG, but anyways...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, agree on that

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 57.697% when pulling 1844b48 on eip-198 into 4f97f27 on develop.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 57.723% when pulling 76fc7e9 on eip-198 into 4f97f27 on develop.

@Nashatyrev Nashatyrev merged commit 1048d01 into develop Aug 22, 2017
@mkalinin mkalinin mentioned this pull request Aug 25, 2017
13 tasks
@mkalinin
Copy link
Contributor Author

Relates to #923

@mkalinin mkalinin deleted the eip-198 branch December 26, 2018 06:34
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.

3 participants