Skip to content

Commit

Permalink
Update executor/src/witgen/global_constraints.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Georg Wiese <[email protected]>
  • Loading branch information
ShuangWu121 and georgwiese authored Oct 3, 2024
1 parent 96bd9fe commit 590da51
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions executor/src/witgen/global_constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,13 +366,7 @@ fn smallest_period_candidate<T: FieldElement>(fixed: &[T]) -> Option<u64> {
if fixed.first() != Some(&0.into()) {
return None;
}

// Handle the special case where last == 0 in Mersenne31 field, which is equivalent to 2^31 - 1
if fixed.last() == Some(&0.into()) {
return None;
}

(1..63).find(|bit| fixed.last() == Some(&((1u64 << bit) - 1).into()))
(1..T::BITS as u64).find(|bit| fixed.last() == Some(&((1u64 << bit) - 1).into()))
}

#[cfg(test)]
Expand Down

0 comments on commit 590da51

Please sign in to comment.