|
@ -364,7 +364,7 @@ impl ToBitsGadget for FpGadget { |
|
|
let mut coeff = F::one();
|
|
|
let mut coeff = F::one();
|
|
|
|
|
|
|
|
|
for bit in bits.iter().rev() {
|
|
|
for bit in bits.iter().rev() {
|
|
|
lc = lc + (coeff, bit.get_variable());
|
|
|
|
|
|
|
|
|
lc += (coeff, bit.get_variable());
|
|
|
|
|
|
|
|
|
coeff.double_in_place();
|
|
|
coeff.double_in_place();
|
|
|
}
|
|
|
}
|
|
@ -412,7 +412,7 @@ impl ToBytesGadget for FpGadget { |
|
|
{
|
|
|
{
|
|
|
match bit {
|
|
|
match bit {
|
|
|
Boolean::Is(bit) => {
|
|
|
Boolean::Is(bit) => {
|
|
|
lc = lc + (coeff, bit.get_variable());
|
|
|
|
|
|
|
|
|
lc += (coeff, bit.get_variable());
|
|
|
coeff.double_in_place();
|
|
|
coeff.double_in_place();
|
|
|
},
|
|
|
},
|
|
|
Boolean::Constant(_) | Boolean::Not(_) => unreachable!(),
|
|
|
Boolean::Constant(_) | Boolean::Not(_) => unreachable!(),
|
|
|