From b7f0352cd8224a62afa6496d5c41f77fe9c3a8c7 Mon Sep 17 00:00:00 2001 From: wborgeaud Date: Wed, 30 Jun 2021 08:25:36 +0200 Subject: [PATCH] Update comment on `reduce` --- src/util/scaling.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/util/scaling.rs b/src/util/scaling.rs index 4941d03f..3449e0b9 100644 --- a/src/util/scaling.rs +++ b/src/util/scaling.rs @@ -91,9 +91,10 @@ impl ReducingFactorTarget { } /// Reduces a length `n` vector of `ExtensionTarget`s using `n/2` `ArithmeticExtensionGate`s. - /// It does this by running two accumulators in parallel. Here's an example with `n=4, alpha=2, D=1`: - /// 1st gate: 2 0 4 11 2 4 24 <- 2*0+4= 4, 2*11+2=24 - /// 2nd gate: 2 4 3 24 1 11 49 <- 2*4+3=11, 2*24+1=49 + /// It does this by batching two steps of Horner's method in each gate. + /// Here's an example with `n=4, alpha=2, D=1`: + /// 1st gate: 2 0 4 4 3 4 11 <- 2*0+4=4, 2*4+3=11 + /// 2nd gate: 2 11 2 24 1 24 49 <- 2*11+2=24, 2*24+1=49 /// which verifies that `2.reduce([1,2,3,4]) = 49`. pub fn reduce( &mut self,