mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-08 00:33:06 +00:00
Use scalar_mul vs converting (#184)
This commit is contained in:
parent
69193a8dc2
commit
1e057e8918
@ -67,7 +67,7 @@ impl<F: Extendable<D>, const D: usize> Gate<F, D> for ArithmeticExtensionGate<D>
|
||||
let addend = vars.get_local_ext(Self::wires_ith_addend(i));
|
||||
let output = vars.get_local_ext(Self::wires_ith_output(i));
|
||||
let computed_output =
|
||||
multiplicand_0 * multiplicand_1 * const_0.into() + addend * const_1.into();
|
||||
(multiplicand_0 * multiplicand_1).scalar_mul(const_0) + addend.scalar_mul(const_1);
|
||||
|
||||
constraints.extend((output - computed_output).to_basefield_array());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user