#prime-field #finite-fields #polynomial #modulo #algebra

polynomial-over-finite-prime-field

polynomial over finite prime field

12 releases

0.5.1 Oct 27, 2024
0.5.0 Oct 27, 2024
0.4.3 Apr 16, 2022
0.3.2 Feb 13, 2022
0.1.1 May 1, 2021

#441 in Math

Download history 4/week @ 2024-07-30 1/week @ 2024-08-20 6/week @ 2024-08-27 1/week @ 2024-09-10 4/week @ 2024-09-17 33/week @ 2024-09-24 7/week @ 2024-10-01 11/week @ 2024-10-08 3/week @ 2024-10-15 191/week @ 2024-10-22 43/week @ 2024-10-29 6/week @ 2024-11-05

245 downloads per month
Used in algebraic-equation-over-f…

AGPL-3.0-or-later

24KB
518 lines

Polynomial ring over finite prime field $\mathbb{F}_p[x]$

use polynomial_over_finite_prime_field::PolynomialOverP;
let p = PolynomialOverP::<i32>::new(vec![3, 1, 4, 1, 5, 9, 2, 6, 5, 3], 17);
let q = PolynomialOverP::<i32>::new(vec![2, 7, 1, 8, 2, 8], 17);
let mut r = p.clone();
let d = r.division(&q);
assert!((d * q + r - p).is_zero());

Licence

AGPL-3.0-or-later


lib.rs:

PolynomialOverP ring over finite prime field $\mathbb{F}_p[x]$

use num_traits::Zero;
use polynomial_over_finite_prime_field::PolynomialOverP;
let p = PolynomialOverP::<i32>::new(vec![3, 1, 4, 1, 5, 9, 2, 6, 5, 3], 17);
let q = PolynomialOverP::<i32>::new(vec![2, 7, 1, 8, 2, 8], 17);
let mut r = p.clone();
let d = r.division(&q);
assert!((d * q + r - p).is_zero());

Dependencies

~2MB
~42K SLoC