polycore 0.1.4

Fields, prime fields, sparse and dense polynomials, and sparse echelon forms.
Documentation
1
2
3
4
5
6
7
8
9
use num_traits::One;
use polycore::Fp;

fn main() {
    for p in [5, 7, 11, 13, 101] {
        let fact = (1..p).fold(Fp::one(), |acc, k| acc * Fp::new(k, p));
        println!("({p} - 1)! = {fact} mod {p}");
    }
}