package logtk

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Some Utils for arith

type divisor = {
  1. prime : Z.t;
  2. power : int;
}
val is_prime : Z.t -> bool

Is the integer prime?

val prime_decomposition : Z.t -> divisor list

Decompose the number into a product of power-of-primes. Cheap if is_prime n was called before.

  • raises Invalid_argument

    if the number is negative

val primes_leq : Z.t -> Z.t Iter.t

Iter of prime numbers smaller than (or equal to) the given number

OCaml

Innovation. Community. Security.