Skip to content

Commit

Permalink
fix(hints): Remove whitespace from INV_MOD_P_UINT512 hint code (#1084)
Browse files Browse the repository at this point in the history
* Add alternative string for hint EC_DOUBLE_ASSIGN_NEW_X

* Remove whitespace from INV_MOD_P_UINT512 hint code

* Remove code from another brach

* Add changelog entry

* Fix integration test

* Remove changelog entry + fix hint in changelog
  • Loading branch information
fmoletta authored Apr 27, 2023
1 parent eb24d89 commit e756edd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@

x = pack_512(ids.x, num_bits_shift = 128)
p = ids.p.low + (ids.p.high << 128)
x_inverse_mod_p = pow(x,-1, p)
x_inverse_mod_p = pow(x,-1, p)

x_inverse_mod_p_split = (x_inverse_mod_p & ((1 << 128) - 1), x_inverse_mod_p >> 128)

Expand Down
2 changes: 1 addition & 1 deletion cairo_programs/inv_mod_p_uint512.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func inv_mod_p_uint512{range_check_ptr}(x: Uint512) -> Uint256 {
x = pack_512(ids.x, num_bits_shift = 128)
p = ids.p.low + (ids.p.high << 128)
x_inverse_mod_p = pow(x,-1, p)
x_inverse_mod_p = pow(x,-1, p)
x_inverse_mod_p_split = (x_inverse_mod_p & ((1 << 128) - 1), x_inverse_mod_p >> 128)
Expand Down
2 changes: 1 addition & 1 deletion src/hint_processor/builtin_hint_processor/hint_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ pub const INV_MOD_P_UINT512: &str = "def pack_512(u, num_bits_shift: int) -> int
x = pack_512(ids.x, num_bits_shift = 128)
p = ids.p.low + (ids.p.high << 128)
x_inverse_mod_p = pow(x,-1, p)
x_inverse_mod_p = pow(x,-1, p)
x_inverse_mod_p_split = (x_inverse_mod_p & ((1 << 128) - 1), x_inverse_mod_p >> 128)
Expand Down

0 comments on commit e756edd

Please sign in to comment.