ZMod64 p is only valid when p is positive and strictly below 2^31.
This small-modulus invariant keeps every residue and the modulus in a UInt64,
makes the sum of two residues fit in a word without carry, and keeps the product
of two residues below 2^62, so the modular multiply reduces a single word (no
__uint128_t) and future convolution kernels can accumulate several products
before one reduction (Barrett/lazy). Every current and anticipated application
(Berlekamp-Zassenhaus, LLL, matrix work) uses small primes, so no needed
generality is lost.
Instance Constructor
Hex.ZMod64.Bounds.mk
Methods
pPos : 0 < p
The modulus is positive.
pLtR : p < 2 ^ 31
The modulus is strictly below 2^31.