Skip to content

Commit

Permalink
Minor fix in the sqrt implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
3sGgpQ8H committed Oct 9, 2022
1 parent 0445edf commit 1669715
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ABDKMath64x64.sol
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ library ABDKMath64x64 {
if (xx >= 0x10000) { xx >>= 16; r <<= 8; }
if (xx >= 0x100) { xx >>= 8; r <<= 4; }
if (xx >= 0x10) { xx >>= 4; r <<= 2; }
if (xx >= 0x8) { r <<= 1; }
if (xx >= 0x4) { r <<= 1; }
r = (r + x / r) >> 1;
r = (r + x / r) >> 1;
r = (r + x / r) >> 1;
Expand Down

0 comments on commit 1669715

Please sign in to comment.