mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-10 09:43:09 +00:00
change to 107
This commit is contained in:
parent
6fc34f6a3d
commit
625544565d
@ -368,19 +368,19 @@ impl<'a> Interpreter<'a> {
|
||||
fn run_addfp254(&mut self) {
|
||||
let x = self.pop();
|
||||
let y = self.pop();
|
||||
self.push((x + y) % 101);
|
||||
self.push((x + y) % 107);
|
||||
}
|
||||
|
||||
fn run_mulfp254(&mut self) {
|
||||
let x = self.pop();
|
||||
let y = self.pop();
|
||||
self.push(U256::try_from(x.full_mul(y) % 101).unwrap());
|
||||
self.push(U256::try_from(x.full_mul(y) % 107).unwrap());
|
||||
}
|
||||
|
||||
fn run_subfp254(&mut self) {
|
||||
let x = self.pop();
|
||||
let y = self.pop();
|
||||
self.push((U256::from(101) + x - y) % 101);
|
||||
self.push((U256::from(107) + x - y) % 107);
|
||||
}
|
||||
|
||||
fn run_div(&mut self) {
|
||||
|
||||
@ -5,7 +5,7 @@ use rand::{thread_rng, Rng};
|
||||
use crate::cpu::kernel::aggregator::combined_kernel;
|
||||
use crate::cpu::kernel::interpreter::run_with_kernel;
|
||||
|
||||
const P254: u32 = 101;
|
||||
const P254: u32 = 107;
|
||||
|
||||
fn add_fp(x: u32, y: u32) -> u32 {
|
||||
(x + y) % P254
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user