mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-08 00:33:06 +00:00
Fix tests
This commit is contained in:
parent
d0aae8c2a7
commit
68af28e9a2
@ -288,6 +288,7 @@ mod tests {
|
||||
config: CircuitConfig {
|
||||
fri_config,
|
||||
num_routed_wires: 6,
|
||||
zero_knowledge: true,
|
||||
..CircuitConfig::large_config()
|
||||
},
|
||||
degree_bits,
|
||||
|
||||
@ -14,10 +14,23 @@ impl<F: Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
x: ExtensionTarget<D>,
|
||||
y: ExtensionTarget<D>,
|
||||
) -> ExtensionTarget<D> {
|
||||
let gate = self.num_gates();
|
||||
// Holds `by - y`.
|
||||
let first_out =
|
||||
ExtensionTarget::from_range(gate, ArithmeticExtensionGate::<D>::wires_first_output());
|
||||
let (gate, range) = if let Some((g, c_0, c_1)) = self.free_arithmetic {
|
||||
if c_0 == F::ONE && c_1 == F::NEG_ONE {
|
||||
(g, ArithmeticExtensionGate::<D>::wires_third_output())
|
||||
} else {
|
||||
(
|
||||
self.num_gates(),
|
||||
ArithmeticExtensionGate::<D>::wires_first_output(),
|
||||
)
|
||||
}
|
||||
} else {
|
||||
(
|
||||
self.num_gates(),
|
||||
ArithmeticExtensionGate::<D>::wires_first_output(),
|
||||
)
|
||||
};
|
||||
let first_out = ExtensionTarget::from_range(gate, range);
|
||||
self.double_arithmetic_extension(F::ONE, F::NEG_ONE, b, y, y, b, x, first_out)
|
||||
.1
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user