Module prime

Module prime 

Source

Re-exports§

pub use binomial::Binomial;
pub use primes_generic::*;

Modules§

binomial
iter
primes_generic

Macros§

def_prime_static 🔒
impl_op_pn_u32 🔒
impl_prime_ops 🔒
impl_try_from 🔒

Enums§

PrimeError

Constants§

TWO

Traits§

Prime
A trait that represents a prime number. There are currently two kinds of structs that implement this trait: static primes and ValidPrime, the dynamic prime.

Functions§

factor_pk
Factor $n$ as $p^k m$. Returns $(k, m)$.
inverse
log2
Compute the base 2 log of a number, rounded down to the nearest integer.
logp
Discrete log base p of n.
minus_one_to_the_n
power_mod
Compute b^e mod p. This is a const version of Prime::pow_mod.