Skip to content

Commit b074e7c

Browse files
committed
Refactor of comments
1 parent 9661a2c commit b074e7c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/metadata/runtime_bindings.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -811,17 +811,17 @@ fn build_egcd_function<'ctx>(
811811
let quotient =
812812
loop_block.append_op_result(arith::divui(prev_remainder, remainder, location))?;
813813

814-
// Then r_(i+1) = r_(i-1) - q * r_i, and inv_(i+1) = inv_(i-1) - q * inv_i
814+
// Then rem_(i+1) = rem_(i-1) - q * rem_i, and inv_(i+1) = inv_(i-1) - q * inv_i
815815
let rem_times_quo = loop_block.muli(remainder, quotient, location)?;
816816
let inv_times_quo = loop_block.muli(inverse, quotient, location)?;
817817
let next_remainder =
818818
loop_block.append_op_result(arith::subi(prev_remainder, rem_times_quo, location))?;
819819
let next_inverse =
820820
loop_block.append_op_result(arith::subi(prev_inverse, inv_times_quo, location))?;
821821

822-
// Check if r_(i+1) is 0
822+
// Check if rem_(i+1) is 0
823823
// If true, then:
824-
// - r_i is the gcd of a and b
824+
// - rem_i is the gcd of a and b
825825
// - inv_i is the bezout coefficient x
826826
let zero = loop_block.const_int_from_type(context, location, 0, integer_type)?;
827827
let next_remainder_eq_zero =

0 commit comments

Comments
 (0)