mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-03 22:33:06 +00:00
Comments
This commit is contained in:
parent
925c0bcb5c
commit
7c1c082a39
@ -35,6 +35,10 @@ impl<F: Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
reverse_index_bits_in_place(&mut evals);
|
||||
let mut old_x_index_bits = self.split_le(old_x_index, arity_bits);
|
||||
old_x_index_bits.reverse();
|
||||
// Want `g^(arity - rev_old_x_index)` as in the out-of-circuit version.
|
||||
// Compute it as `g^(arity-1-rev_old_x_index) * g`, where the first term is gotten using two's complement.
|
||||
// TODO: Once the exponentiation gate lands, we won't need the bits and will be able to compute
|
||||
// `g^(arity-rev_old_x_index)` directly.
|
||||
let start = self.exp_from_complement_bits(gt, &old_x_index_bits);
|
||||
let start = self.mul(start, x);
|
||||
let start = self.mul(start, gt);
|
||||
|
||||
@ -30,8 +30,8 @@ fn compute_evaluation<F: Field + Extendable<D>, const D: usize>(
|
||||
// The evaluation vector needs to be reordered first.
|
||||
let mut evals = last_evals.to_vec();
|
||||
reverse_index_bits_in_place(&mut evals);
|
||||
let rev_x_index = reverse_bits(old_x_index, arity_bits);
|
||||
let start = x * g.exp((arity - rev_x_index) as u64);
|
||||
let rev_old_x_index = reverse_bits(old_x_index, arity_bits);
|
||||
let start = x * g.exp((arity - rev_old_x_index) as u64);
|
||||
// The answer is gotten by interpolating {(x*g^i, P(x*g^i))} and evaluating at beta.
|
||||
let points = g
|
||||
.powers()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user