package euler

  1. Overview
  2. Docs
An arithmetic library for OCaml's standard integers

Install

Dune Dependency

Authors

Maintainers

Sources

euler-0.1.tbz
sha256=46786c629673fc8f36c6ee57764778188983f6de8e24d3003a8de21e4752919c
sha512=5273d89967cba8397139a179c243ecb7a80c008961a06bc5396316cc32651fc902a9eb0152b98f5075db4331349d6c8dc23f249ca3fc67be5b984daac9debd6c

doc/euler/Euler/Diophantine/index.html

Module Euler.DiophantineSource

Solving diophantine equations, i.e. equations on integers.

Sourceexception No_solution

Raised when a system has no solution.

Sourceval solve_congruences : (int * int * int) Seq.t -> int * int

solve_congruences @@ List.to_seq [ (a1, b1, m1) ; … ; (ak, bk, mk) ], provided that the mi are non-zero, solves the following linear congruence system of unknown x:

  • a1 · x ≡m1 b1
  • ak · x ≡mk bk

TODO: complexity?

  • returns

    a pair (x, m) where 0 ≤ x < m, which represents the set of solutions x + mℤ,

OCaml

Innovation. Community. Security.