Skip to content

Commit

Permalink
fix: workaround shifts to compile with latest noir
Browse files Browse the repository at this point in the history
  • Loading branch information
sirasistant committed Aug 26, 2024
1 parent eebae98 commit 75d10a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/u60_representation.nr
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@ impl<let N: u32, let NumSegments: u32> U60Repr<N, NumSegments> {
let value = self.limbs.get(0);

let mut remainder = (value >> remainder_shift);
result.limbs.set(num_shifted_limbs, (value << limb_shift) & mask);
result.limbs.set(num_shifted_limbs, (value << (limb_shift as u8)) & mask);

// shift 84. num shifted = 1

for i in 1..((N * NumSegments) - num_shifted_limbs) {
let value = self.limbs.get(i);
let upshift = ((value << limb_shift) + remainder) & mask;
let upshift = ((value << (limb_shift as u8)) + remainder) & mask;
result.limbs.set(i + num_shifted_limbs, upshift);
remainder = (value >> remainder_shift);
// let remainder: u64 = (self.limbs.get(i + num_shifted_limbs as u64) << remainder_shift as u8) & mask;
Expand Down

0 comments on commit 75d10a4

Please sign in to comment.