change to 107

This commit is contained in:
Dmitry Vagner 2022-10-18 11:07:43 -04:00
parent 6fc34f6a3d
commit 625544565d
2 changed files with 4 additions and 4 deletions

View File

@ -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) {

View File

@ -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