Skip to content

Commit

Permalink
o1vm/riscv32im: simplify mod_signed
Browse files Browse the repository at this point in the history
  • Loading branch information
dannywillems committed Dec 2, 2024
1 parent 0ad5fea commit 4e0220d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions o1vm/src/interpreters/riscv32im/witness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,9 @@ impl<Fp: Field> InterpreterEnv for Env<Fp> {
y: &Self::Variable,
position: Self::Position,
) -> Self::Variable {
let x: u32 = (*x).try_into().unwrap();
let y: u32 = (*y).try_into().unwrap();
let res = ((x as i32) % (y as i32)) as u32;
let x: i32 = (*x).try_into().unwrap();
let y: i32 = (*y).try_into().unwrap();
let res = (x % y) as u32;
let res = res as u64;
self.write_column(position, res);
res
Expand Down

0 comments on commit 4e0220d

Please sign in to comment.