Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#### Upcoming Changes

* fix: fix `UINT256_MUL_DIV_MOD` hint [#1320](https://github.com/lambdaclass/cairo-vm/pull/1320)

* feat: add dependency installation script `install.sh` [#1298](https://github.com/lambdaclass/cairo-vm/pull/1298)

* fix: specify resolver version 2 in the virtual workspace's manifest [#1311](https://github.com/lambdaclass/cairo-vm/pull/1311)
Expand Down
8 changes: 4 additions & 4 deletions vm/src/hint_processor/builtin_hint_processor/uint256_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,10 @@ pub fn uint256_mul_div_mod(
let div_high = div_high.as_ref();

// Main Logic
let a = a_high.shl(128_usize) + a_low;
let b = b_high.shl(128_usize) + b_low;
let div = div_high.shl(128_usize) + div_low;
let (quotient, remainder) = (a.to_biguint() * b.to_biguint()).div_mod_floor(&div.to_biguint());
let a = a_high.to_biguint().shl(128_usize) + a_low.to_biguint();
let b = b_high.to_biguint().shl(128_usize) + b_low.to_biguint();
let div = div_high.to_biguint().shl(128_usize) + div_low.to_biguint();
let (quotient, remainder) = (a * b).div_mod_floor(&div);

// ids.quotient_low.low
vm.insert_value(
Expand Down