feat: add division and powmod (WIP) and start adapting task runner
This commit is contained in:
parent
a05f2f02b6
commit
deb4261121
4 changed files with 183 additions and 16 deletions
15
src/tasks/tasks01/pfmath.rs
Normal file
15
src/tasks/tasks01/pfmath.rs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
use anyhow::Result;
|
||||
use base64::{prelude::BASE64_STANDARD, Engine};
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::utils::field::Polynomial;
|
||||
|
||||
pub fn gfpoly_add(args: &Value) -> Result<Polynomial> {
|
||||
let poly_a = Polynomial::from_c_array(&args["A"].clone());
|
||||
|
||||
let poly_b = Polynomial::from_c_array(&args["B"].clone());
|
||||
|
||||
let result = poly_a + poly_b;
|
||||
|
||||
Ok(result)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue