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

return wrong value #3

Open
yonggewang opened this issue Nov 14, 2020 · 1 comment
Open

return wrong value #3

yonggewang opened this issue Nov 14, 2020 · 1 comment

Comments

@yonggewang
Copy link

for the

function div256_128By256(uint a21, uint a0, uint b) public pure returns (uint q, uint r)

If we we b=2^128, a0=0, a21=2^128

then the output is: q= 2^129 . I think the output should be 2^128

@cag
Copy link
Contributor

cag commented Dec 17, 2020

Yeah, output should be 2^128, this library is broken 😱

Edit: Also should note that I didn't actually confirm this, but for the time being I'm taking on good faith that this report is accurate right now.

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

No branches or pull requests

2 participants