Skip to content

Commit

Permalink
fix: re-fix comment (chainsec 5.1.1) (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
adhusson authored Nov 10, 2023
1 parent 2528d5d commit 596ed77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/TickTreeLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ library LeafLib {
Explanation:
Note that unlike in fields, have their low bin on the most significant bits.
`pos` is initially 1 if `leaf` has some nonzero bit in its MSB half, 0 otherwise. Then `pos` is `A | B`, where `A` is `iszero(pos)<<1`, so `A` is 0 if leaf has some nonzero bit in its MSB half, 2 otherwise. And `B` is 0 if `leaf >> (pos << 7)` has some nonzero bit in its most significant 192 bits, 0 otherwise.
`pos` is initially 1 if `leaf` has some nonzero bit in its MSB half, 0 otherwise. Then `pos` is `A | B`, where `A` is `iszero(pos)<<1`, so `A` is 0 if leaf has some nonzero bit in its MSB half, 2 otherwise. And `B` is 0 if `leaf >> (pos << 7)` has some nonzero bit in its most significant 192 bits, 1 otherwise.
*/
function bestNonEmptyBinPos(Leaf leaf) internal pure returns (uint pos) {
assembly("memory-safe") {
Expand Down

0 comments on commit 596ed77

Please sign in to comment.