Expand description
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);
Structs§
Traits§
- Normarize ring element
Functions§
- Find all roots of polynomial in modulo prime.
- calcurate Jacobi symbol
- Solve: $
ax + b ≡ 0 \pmod p
$ - Solve: $
ax^2 + bx + c ≡ 0 \pmod p
$ - Solve: $
x^2 ≡ a \pmod p
$