diff --git a/src/gadgets/arithmetic.rs b/src/gadgets/arithmetic.rs index 00dbbe21..d8dce53d 100644 --- a/src/gadgets/arithmetic.rs +++ b/src/gadgets/arithmetic.rs @@ -206,11 +206,11 @@ impl, const D: usize> CircuitBuilder { /// Multiply `n` `Target`s. pub fn mul_many(&mut self, terms: &[Target]) -> Target { - let terms_ext = terms - .iter() - .map(|&t| self.convert_to_ext(t)) - .collect::>(); - self.mul_many_extension(&terms_ext).to_target_array()[0] + let mut product = self.one(); + for &term in terms { + product = self.mul(product, term); + } + product } /// Exponentiate `base` to the power of `2^power_log`.