Skip to content

Commit

Permalink
formal_derivative: Simply expression for width using `trailing_zero…
Browse files Browse the repository at this point in the history
…s()` instead
  • Loading branch information
AndersTrier committed Aug 12, 2024
1 parent c3ee681 commit 566fde7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ pub trait Engine {
Self: Sized,
{
for i in 1..data.len() {
let width: usize = ((i ^ (i - 1)) + 1) >> 1;
let width: usize = 1 << i.trailing_zeros();
Self::xor_within(data, i - width, i, width);
}
}
Expand Down

0 comments on commit 566fde7

Please sign in to comment.