Skip to content

Commit

Permalink
Revert "optimization"
Browse files Browse the repository at this point in the history
This reverts commit 06e9cc2.
  • Loading branch information
benesjan committed Jan 10, 2025
1 parent 06e9cc2 commit e56a20c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ fn get_prev_power_2(value: u32) -> u32 {
get_next_power_exponent(value, 0)
};

let prev_power_2 = 1 << (next_power_exponent - 1);
let next_power_2 = prev_power_2 * 2;
let next_power_2 = 1 << next_power_exponent;
let prev_power_2 = next_power_2 / 2;
assert(prev_power_2 < value);
assert(value <= next_power_2);

Expand Down

0 comments on commit e56a20c

Please sign in to comment.