include Funarith.Prime.S with type Z.t = Z.t
module Z : Funarith.Int.FULL with type t = Z.t
type divisor
=
{
prime : Z.t;
power : int;
}
module Cache : sig ... end
val is_prime : ?cache:Cache.t ‑> Z.t ‑> bool
Is the integer prime?
val prime_decomposition : ?cache:Cache.t ‑> Z.t ‑> divisor list
Decompose the number into a product of power-of-primes. Cheap if cache=Some c and is_prime_cached c n was called before.
cache=Some c
is_prime_cached c n
val primes_leq : ?cache:Cache.t ‑> Z.t ‑> Z.t Sequence.t
Sequence of prime numbers smaller than (or equal to) the given number.
Some c
c