We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f04890e commit d1c8612Copy full SHA for d1c8612
contracts/libraries/Math.sol
@@ -7,7 +7,7 @@ library Math {
7
8
function sqrt(uint y) internal pure returns (uint z) {
9
if (y > 3) {
10
- uint x = (y + 1) / 2;
+ uint x = y / 2 + 1;
11
z = y;
12
while (x < z) {
13
z = x;
0 commit comments