This commit is contained in:
wborgeaud 2021-08-13 18:00:40 +02:00
parent 9547aa6382
commit 43641174cb
2 changed files with 3 additions and 0 deletions

View File

@ -320,6 +320,7 @@ impl<F: Extendable<D>, const D: usize> CircuitBuilder<F, D> {
let g_ext = self.convert_to_ext(g);
let phi_ext = self.convert_to_ext(phi);
let zero = self.zero_extension();
// `subgroup_x = g*phi, vanish_zeta = g*phi - zeta`
let tmp = self.double_arithmetic_extension(
F::ONE,
F::NEG_ONE,

View File

@ -215,6 +215,8 @@ impl<const D: usize> ReducingFactorTarget<D> {
builder.mul_extension(exp, x)
}
/// Returns `(self.shift(x), a*b)`.
/// Used to take advantage of the second arithmetic operation in the `ArithmeticExtensionGate`.
pub fn shift_and_mul<F>(
&mut self,
x: ExtensionTarget<D>,