Skip to content

Commit

Permalink
(fix) Replace div_rem with div_mod_floor (#1881)
Browse files Browse the repository at this point in the history
* replace div_rem with div_mod_floor

* format

* changelog

* remove unwanted programs

* clippy

* fix changelog
  • Loading branch information
FrancoGiachetta authored Dec 3, 2024
1 parent 577f744 commit d2c056e
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 46 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

#### Upcoming Changes

* fix: replace `div_rem` with `div_mod_floor` in `verify_zero` hints [#1881](https://github.com/lambdaclass/cairo-vm/pull/1881)

* feat: Implement `SECP related` hints [#1829](https://github.com/lambdaclass/cairo-vm/pull/1829)

* chore: bump pip `cairo-lang` 0.13.3 [#1884](https://github.com/lambdaclass/cairo-vm/pull/1884)

* fix: [#1862](https://github.com/lambdaclass/cairo-vm/pull/1862):
* Use MaybeRelocatable for relocation table

Expand Down
88 changes: 44 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub fn verify_zero(
) -> Result<(), HintError> {
exec_scopes.insert_value("SECP_P", secp_p.clone());
let val = Uint384::from_var_name("val", vm, ids_data, ap_tracking)?.pack86();
let (q, r) = val.div_rem(secp_p);
let (q, r) = val.div_mod_floor(secp_p);
if !r.is_zero() {
return Err(HintError::SecpVerifyZero(Box::new(val)));
}
Expand All @@ -62,7 +62,7 @@ pub fn verify_zero_with_external_const(
) -> Result<(), HintError> {
let secp_p = exec_scopes.get_ref("SECP_P")?;
let val = Uint384::from_var_name("val", vm, ids_data, ap_tracking)?.pack86();
let (q, r) = val.div_rem(secp_p);
let (q, r) = val.div_mod_floor(secp_p);
if !r.is_zero() {
return Err(HintError::SecpVerifyZero(Box::new(val)));
}
Expand Down

0 comments on commit d2c056e

Please sign in to comment.