Skip to content

Commit

Permalink
formatter with 0.37.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Khashayar Barooti committed Jan 13, 2025
1 parent 2b2254f commit 3bda7ce
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/_comparison_tools/lt.nr
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub fn lte_field_240_bit(x: Field, y: Field) -> bool {
// if false, x <= y is wrong therefore x > y => x - y > 0 => x - y + 1 >= 0
// (y - x) * p + (1 - p) * (x - y + 1)
// (y - x) * p + x - y + 1 + p * (y - x)

let lt_parameter = 2 * (predicate as Field) * delta - predicate as Field - delta + 1;
// checks that the bit length of lt_parameter is 240
// i.e. checks the sign of lt_parameter
Expand Down
1 change: 0 additions & 1 deletion src/_string_tools/slice_packed_field.nr
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,6 @@ unconstrained fn decompose(val: Field) -> [Field; 16] {
pub fn get_last_limb_path<let OutputFields: u32>(last_limb_index: Field) -> [Field; OutputFields] {
// TODO we offset by 1 explain why (0 byte length produces 0 - 1 which = invalid array index. we just add 1 and increase array length by 1 to compensate)
let path = LAST_LIMB_PATH[last_limb_index + 1]; // 2

//@Safety: check the comments below
let path_valid_bits = unsafe { decompose(path) };
let mut path_valid_sum: Field = 0;
Expand Down

0 comments on commit 3bda7ce

Please sign in to comment.