Skip to content

Commit

Permalink
Merge pull request PaulRBerg#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 and KholdStare committed Dec 5, 2023
1 parent 1edf08d commit b5fdb62
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 @@ -437,7 +437,7 @@ function prbExp2(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 b5fdb62

Please sign in to comment.