diff --git a/src/gates/exponentiation.rs b/src/gates/exponentiation.rs index 7498e4ab..2dd3b009 100644 --- a/src/gates/exponentiation.rs +++ b/src/gates/exponentiation.rs @@ -28,7 +28,9 @@ impl, const D: usize> ExponentiationGate { } pub fn max_power_bits(num_wires: usize, num_routed_wires: usize) -> usize { - num_wires / num_routed_wires + let max_for_routed_wires = num_routed_wires - 3; + let max_for_wires = (num_wires - 2) / 2; + max_for_routed_wires.min(max_for_wires) } pub fn wire_base(&self) -> usize {