private with Multi_Precision_Integers; -- This source is licensed under Creative Commons CC0 v1.0. -- -- To read the full text, see license.txt in the main directory of this repository -- or go to https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt -- -- For a human readable summary, go to https://creativecommons.org/publicdomain/zero/1.0/ package Rationals is type Fraction is private; function "+" (Left, Right : in Fraction) return Fraction; function "+" (Left : in Fraction; Right : in Integer) return Fraction; function "+" (Left : in Integer; Right : in Fraction) return Fraction; function "-" (Left, Right : in Fraction) return Fraction; function "-" (Left : in Fraction; Right : in Integer) return Fraction; function "-" (Left : in Integer; Right : in Fraction) return Fraction; function "-" (Right : in Fraction) return Fraction; function "*" (Left, Right : in Fraction) return Fraction; function "*" (Left : in Fraction; Right : in Integer) return Fraction; function "*" (Left : in Integer; Right : in Fraction) return Fraction; function "/" (Left, Right : in Fraction) return Fraction; function "/" (Left : in Fraction; Right : in Integer) return Fraction; function "/" (Left : in Integer; Right : in Fraction) return Fraction; function "/" (Left, Right : in Integer) return Fraction; function "=" (Left, Right : in Fraction) return Boolean; function "=" (Left : in Fraction; Right : in Integer) return Boolean; function "=" (Left : in Integer; Right : in Fraction) return Boolean; function "<=" (Left, Right : in Fraction) return Boolean; function "<=" (Left : in Fraction; Right : in Integer) return Boolean; function "<=" (Left : in Integer; Right : in Fraction) return Boolean; function "<" (Left, Right : in Fraction) return Boolean; function "<" (Left : in Fraction; Right : in Integer) return Boolean; function "<" (Left : in Integer; Right : in Fraction) return Boolean; function ">=" (Left, Right : in Fraction) return Boolean; function ">=" (Left : in Fraction; Right : in Integer) return Boolean; function ">=" (Left : in Integer; Right : in Fraction) return Boolean; function ">" (Left, Right : in Fraction) return Boolean; function ">" (Left : in Fraction; Right : in Integer) return Boolean; function ">" (Left : in Integer; Right : in Fraction) return Boolean; function Numerator (Item : in Fraction) return Integer; function Denominator (Item : in Fraction) return Integer; function Floor (Item : in Fraction) return Integer; function Ceiling (Item : in Fraction) return Integer; function Round (Item : in Fraction) return Integer; function Image (Item : in Fraction) return String; function Value (Item : in String) return Fraction; private use Multi_Precision_Integers; M_Size : constant Basic_Int := 4; type Fraction is record Num : Multi_Int (M_Size); Den : Multi_Int (M_Size); end record; end Rationals;