Skip to content

Commit

Permalink
Merge pull request #179 from andreivladbrg/andrei/fix-exp2
Browse files Browse the repository at this point in the history
Fix bit mask in `Common.exp2` function
  • Loading branch information
PaulRBerg authored Mar 27, 2023
2 parents fc46375 + 3d383c8 commit df27d3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Common.sol
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function exp2(uint256 x) pure returns (uint256 result) {
}
}

if (x & 0xFF00000000 > 0) {
if (x & 0xFF000000 > 0) {
if (x & 0x80000000 > 0) {
result = (result * 0x10000000058B90BFC) >> 64;
}
Expand Down

0 comments on commit df27d3d

Please sign in to comment.