feat: add function for polynomial differentiation

This commit is contained in:
Alivecow 2024-11-23 10:17:08 +01:00
parent b595276143
commit 4b1bca8ee0
5 changed files with 69 additions and 22 deletions

View file

@ -97,6 +97,14 @@ pub fn gfpoly_sqrt(args: &Value) -> Result<Polynomial> {
Ok(result)
}
pub fn gfpoly_diff(args: &Value) -> Result<Polynomial> {
let poly_f = Polynomial::from_c_array(&args["F"].clone());
let result = poly_f.diff();
Ok(result)
}
#[cfg(test)]
mod tests {
use super::*;