AFIT/Source/builtin/basic_arithmetics.ml

24 lines
625 B
OCaml

(** Basic arithmetics with built-in integers *)
open Builtin
(* Greater common divisor and smaller common multiple
implemetations.
*)
(** Greater common (positive) divisor of two non-zero integers.
@param a non-zero integers
@param b non-zero integer
*)
let rec gcd a b = 0
(* Extended Euclidean algorithm. Computing Bezout Coefficients. *)
(** Extended euclidean division of two integers NOT OCAML DEFAULT.
Given non-zero entries a b computes triple (u, v, d) such that
a*u + b*v = d and d is gcd of a and b.
@param a non-zero integer
@param b non-zero integer.
*)
let bezout a b = (0, 0, 0)