Skip to content

Latest commit

 

History

History
25 lines (14 loc) · 515 Bytes

README.adoc

File metadata and controls

25 lines (14 loc) · 515 Bytes

modular-arithmetic

An ocaml library for operations on integers modulo some integer (the modulus)

Installation

Using opam:

$ opam install modular-arithmetic

Usage

Example:

module M = Mod_arith.Make(struct let modulus = 12 end)
let () =
  assert M.(equal (of_int 5 * of_int 2 + of_string "15") one)

License

This library and associated code are released under the Mozilla Public License 2.0 (check LICENSE.txt).

Copyright (c) 2018, Raphael Sousa Santos <contact@raphaelss.com>