Skip to content

Commit

Permalink
remove u64 assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewvious committed Aug 24, 2023
1 parent b71d298 commit fd4fe9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sway-lib-std/src/u256.sw
Original file line number Diff line number Diff line change
Expand Up @@ -677,13 +677,13 @@ impl Power for U256 {
while n > u_one {
if is_even(n) {
x = x * x;
n >>= 1u64;
n >>= 1;
} else {
y = x * y;
x = x * x;
// to reduce odd number by 1 we should just clear the last bit
n.d = n.d & ((!0u64)>>1);
n >>= 1u64;
n >>= 1;
}
}
x * y
Expand Down

0 comments on commit fd4fe9d

Please sign in to comment.