From b5fdb62aff691bddaaffecc84f1318841667530a Mon Sep 17 00:00:00 2001 From: Paul Razvan Berg Date: Mon, 27 Mar 2023 17:53:22 +0300 Subject: [PATCH] Merge pull request #179 from andreivladbrg/andrei/fix-exp2 Fix bit mask in `Common.exp2` function --- src/Common.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common.sol b/src/Common.sol index 8c9abda8..e231aed8 100644 --- a/src/Common.sol +++ b/src/Common.sol @@ -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; }