mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-11 10:13:09 +00:00
PR feedback
This commit is contained in:
parent
e87aa2c90b
commit
47b9936487
@ -192,7 +192,7 @@ impl<F: Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
pub fn exp_from_complement_bits(
|
||||
&mut self,
|
||||
base: Target,
|
||||
exponent_bits: impl ExactSizeIterator<Item = impl Borrow<Target>>,
|
||||
exponent_bits: impl Iterator<Item = impl Borrow<Target>>,
|
||||
) -> Target {
|
||||
let mut current = base;
|
||||
let one_ext = self.one_extension();
|
||||
|
||||
@ -14,11 +14,10 @@ impl<F: Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
self.route(x, sum);
|
||||
}
|
||||
|
||||
/// Returns the first `n_log` little-endian bits of `x`.
|
||||
/// Note: `x` is assumed to be range-checked for having `num_bits` bits.
|
||||
pub fn low_bits(&mut self, x: Target, n_log: usize, num_bits: usize) -> Vec<Target> {
|
||||
/// Returns the first `num_low_bits` little-endian bits of `x`.
|
||||
pub fn low_bits(&mut self, x: Target, num_low_bits: usize, num_bits: usize) -> Vec<Target> {
|
||||
let mut res = self.split_le(x, num_bits);
|
||||
res.truncate(n_log);
|
||||
res.truncate(num_low_bits);
|
||||
res
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user