package core_extended

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include Number.Verified_std with type repr = Core.Int.t
type repr = Core.Int.t
module type S = Number.S with type repr = repr

Abbreviations

module type S0 = Number.S0 with type repr = repr
module Pos : S with type t = private repr

Positive and negative numbers with and without zero.

module Pos0 : S0 with type t = private repr
module Neg : S with type t = private repr
module Neg0 : S0 with type t = private repr
module type Bounded_spec = sig ... end

Specification of bounded numbers

module type Bounded = sig ... end

Signature of bounded numbers

module Make_bounded (Spec : Bounded_spec) : Bounded with type t = private repr

Functor of creating bounded numbers

Unsafe modules and functors that still fully expose the representation for extensibility.

module Pos_unsafe : S with type t = repr
module Pos0_unsafe : S0 with type t = repr
module Neg_unsafe : S with type t = repr
module Neg0_unsafe : S0 with type t = repr
val gcd : int -> int -> int

Computes greatest common divisor for the given two integers, with convention that gcd 0 0 = 0.

Returns a nonnegative value unless one of the arguments is Int.min_value and the other is Int.min_value or 0, in which case Int.min_value is returned.

OCaml

Innovation. Community. Security.