diff --git a/src/_comparison_tools/lt.nr b/src/_comparison_tools/lt.nr index 394e7f4..0d35fd6 100644 --- a/src/_comparison_tools/lt.nr +++ b/src/_comparison_tools/lt.nr @@ -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 diff --git a/src/_string_tools/slice_packed_field.nr b/src/_string_tools/slice_packed_field.nr index 26608b4..04d0c85 100644 --- a/src/_string_tools/slice_packed_field.nr +++ b/src/_string_tools/slice_packed_field.nr @@ -642,7 +642,6 @@ unconstrained fn decompose(val: Field) -> [Field; 16] { pub fn get_last_limb_path(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;