-- The package specification for Generic_Primitive_Functions generic type Float_Type is digits <>; type Exponent_Type is range <>; package Generic_Primitive_Functions is function Exponent (X : Float_Type ) return Exponent_Type; function Fraction (X : Float_Type ) return Float_Type; procedure Decompose (X : in Float_Type; Fraction : out Float_Type; Exponent : out Exponent_Type); function Compose (Fraction : Float_Type; Exponent : Exponent_Type) return Float_Type; function Scale (X : Float_Type; Exponent : Exponent_Type) return Float_Type; function Floor (X : Float_Type ) return Float_Type; function Ceiling (X : Float_Type ) return Float_Type; function Round (X : Float_Type ) return Float_Type; function Truncate (X : Float_Type ) return Float_Type; function Remainder (X, Y : Float_Type ) return Float_Type; function Adjacent (X, Towards : Float_Type ) return Float_Type; function Successor (X : Float_Type ) return Float_Type; function Predecessor (X : Float_Type ) return Float_Type; function Copy_Sign (Value, Sign : Float_Type ) return Float_Type; function Leading_Part (X : Float_Type; Radix_Digits: Positive ) return Float_Type; end Generic_Primitive_Functions ; -- -- This package defines subprograms for manipulating the fraction part and the -- exponent part of a defined (unbiased) floating point machine number -- representation of values of the generic floating point type. -- Other functions are provided related to spacing and rounding. -- Some subprograms are redundant in that they are combinations of other -- subprograms. This is intentional so that convenient calls and fast -- execution can be provided to the user. -- -- -- pragma Share_Body ( Generic_Primitive_Functions, False );