We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aaad4df commit f71cd48Copy full SHA for f71cd48
src/jug.sol
@@ -47,7 +47,7 @@ contract Jug is DSNote {
47
let half := div(b, 2) // for rounding.
48
for { n := div(n, 2) } n { n := div(n,2) } {
49
let xx := mul(x, x)
50
- if iszero(eq(div(xx, x), x)) { revert(0,0) }
+ if shr(128, x) { revert(0,0) }
51
let xxRound := add(xx, half)
52
if lt(xxRound, xx) { revert(0,0) }
53
x := div(xxRound, b)
src/pot.sol
@@ -85,7 +85,7 @@ contract Pot is DSNote {
85
let half := div(base, 2) // for rounding.
86
87
88
89
90
91
x := div(xxRound, base)
0 commit comments