Skip to content

Commit

Permalink
chores: more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hero78119 committed Oct 3, 2024
1 parent feef39f commit 73e0a27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ceno_zkvm/src/uint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ impl<const M: usize, const C: usize, E: ExtensionField> UIntLimbs<M, C, E> {
.unwrap_or_default(),
"assign input length mismatch",
);
if let Some(carries_auxiliray_lt_config) = &self.carries_auxiliary_lt_config {
if let Some(carries_auxiliary_lt_config) = &self.carries_auxiliary_lt_config {
// constrain carry range
for (lt_config, carry) in carries_auxiliray_lt_config.iter().zip_eq(carry_values) {
for (lt_config, carry) in carries_auxiliary_lt_config.iter().zip_eq(carry_values) {
lt_config.assign_instance(instance, lkm, Into::<u64>::into(*carry), max_carry)?;
}
}
Expand Down
3 changes: 3 additions & 0 deletions ceno_zkvm/src/uint/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ mod tests {

#[test]
fn test_max_combinations_degree() {
// degree=1 is pure add, therefore only one term
assert_eq!(1, max_combinations(1, 4));
// for degree=2 mul, we have u[0]*v[3], u[1]*v[2], u[2]*v[1], u[3]*v[0]
// thus 4 terms
assert_eq!(4, max_combinations(2, 4));
}

Expand Down

0 comments on commit 73e0a27

Please sign in to comment.