algebraic-equation-over-finite-prime-field

Crates.ioalgebraic-equation-over-finite-prime-field
lib.rsalgebraic-equation-over-finite-prime-field
version0.2.1
sourcesrc
created_at2021-05-05 12:10:21.367762
updated_at2021-08-04 16:18:15.152084
descriptionsolve algebraic equation over finite prime field
homepage
repositoryhttps://gitlab.com/Toru3/algebraic-equation-over-finite-prime-field
max_upload_size
id393422
size23,115
(Toru3)

documentation

https://docs.rs/algebraic-equation-over-finite-prime-field

README

Find roots of polynomial in modulo prime.

use algebraic_equation_over_finite_prime_field::{find_all_roots_over_mod_p, PolynomialOverP};
// (x^2+2)(x-1)(x-3)≡x^4+x^3+2x+1 (mod 5)
let p = PolynomialOverP::<i32>::new(vec![1, 2, 0, 1, 1], 5);
let mut v = find_all_roots_over_mod_p::<i32>(p);
v.sort();
assert_eq!(vec![1, 3], v);

Licence

AGPL-3.0-or-later

Commit count: 9

cargo fmt