solidity-arithmetic
solidity-arithmetic copied to clipboard
return wrong value
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
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.