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
245 downloads per month
Used in algebraic-equation-over-f…
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