The unified diff between revisions [6ea1c036..] and [8044077b..] is displayed below. It can also be downloaded as a raw diff.
#
#
# patch "Makefile"
# from [cc53600fe0b98885d1137a1053f90bbefd34e084]
# to [689b9fc3592b4bd96d2a1a024355051d11138cf0]
#
# patch "Makefile_build.gpr"
# from [ab58c48c17c6e2a9f27df1e804f0389e2c0cec91]
# to [8851966236462af4f5e3e053aedb2c653fe60295]
#
# patch "Makefile_test.gpr"
# from [62449fe7f11bab6e4e0f67d360e2937b6c5bdc16]
# to [5b16fc0985f7cf3c79de3a2cbb95c774431441ab]
#
# patch "README"
# from [da8bedff4125177565c105648c933f87f36a6afe]
# to [fd845526ab6c9759c000e2a413765ce0b2ebdba3]
#
# patch "TODO"
# from [b32b943c2b288fb34c1de29a886be7adebdac096]
# to [b3f00aee8eb4f260012feef14bfec87d37f79812]
#
# patch "demo/demo.adb"
# from [a590f717388626b429d7179eacfcf638f4bf7777]
# to [bf34ff41925069aec7cf3dd9322a343ed4841ac6]
#
# patch "src/gmp-binding.adb"
# from [55dd50075c4545c830d23b383720e36164fc9d7d]
# to [8c75f82d5ebaa866f82fc3f2ebf2ef61492bf467]
#
# patch "src/gnu_multiple_precision-aux.adb"
# from [9ecc5944ad79762d1986e615e8a1d22ed905987f]
# to [46192867bd94852a1e11dc8f04769900a110a12f]
#
# patch "src/gnu_multiple_precision-aux.ads"
# from [8f8f1360ec6e6e256b57fd8901588ef31f9a5c0d]
# to [2e3e7d02fad8c8e135910d1852502cf89c4c4489]
#
# patch "src/gnu_multiple_precision-big_floats.adb"
# from [0bf139a7891dc071c5e90af95ac828175c3e5ccf]
# to [14fe3dec5ba854537ce728d47e8695e8f60c10db]
#
# patch "src/gnu_multiple_precision-big_floats.ads"
# from [f20e34f970beddf610c37d1ca9b591d7889df63b]
# to [e89680a1e747faa37a9bdffdb904568eed8286ff]
#
# patch "src/gnu_multiple_precision-big_integers.adb"
# from [c4f6e71182c2c967bfe0ef0619c8afcc467858bc]
# to [70e3afdba1461e841edd740eb9f9dba83c27973d]
#
# patch "src/gnu_multiple_precision-big_integers.ads"
# from [216f74f0fec190f4fe3788ba3c11804235bc9e5a]
# to [c9b80a78af25d5342e98ce0c2d00c2f07f667fea]
#
# patch "src/gnu_multiple_precision-big_rationals.adb"
# from [24de5d972adc95e47640f57d4af53c0157d93d54]
# to [36a925148a723282fcf71d5952f0d41d56cc8d30]
#
# patch "src/gnu_multiple_precision-big_rationals.ads"
# from [41f51fb7229d8f24a3b2783fccdeb6ee0f354f86]
# to [610ec4b18a5a298bc4cca392c306684ade36b447]
#
# patch "src/gnu_multiple_precision-generic_text_io.adb"
# from [5a3251bd00500d84d4c4a577b6b5ea8bf4a25ffc]
# to [ec0a9815d96bcdb88e3f9d725d990e3ba0dbb638]
#
# patch "src/gnu_multiple_precision-random_numbers.adb"
# from [5b4e051cab8ea9c610f074f8e196e7fc919e7ec0]
# to [72d457ef3948c47997b0c1d2ccf394b5150f5d69]
#
# patch "src/gnu_multiple_precision-random_numbers.ads"
# from [d9d5c61324f56c543ef1253908b771778eab9b33]
# to [2fbd755e97cb528bd3148630919a53d47c6a8467]
#
# patch "src/gnu_multiple_precision.adb"
# from [40679ee47f955c2374deda949d02b0b905d5da19]
# to [ec81f2de3b5e325148874fe377d32155433a8209]
#
# patch "src/gnu_multiple_precision.ads"
# from [176c263393d12be4c6504f127ffa42e79881f072]
# to [3bf19adb7549eb141f6c009242662efaad43574e]
#
============================================================
--- Makefile cc53600fe0b98885d1137a1053f90bbefd34e084
+++ Makefile 689b9fc3592b4bd96d2a1a024355051d11138cf0
@@ -54,6 +54,7 @@ clean:
clean:
rm -rf $(TO_CLEAN)
+ find -name "*~" -delete
install: build
install -d $(DESTDIR)/usr/share/ada/adainclude/$(LIB_NAME)
============================================================
--- Makefile_build.gpr ab58c48c17c6e2a9f27df1e804f0389e2c0cec91
+++ Makefile_build.gpr 8851966236462af4f5e3e053aedb2c653fe60295
@@ -29,7 +29,7 @@ project Makefile_Build is
for Library_Dir use "build-lib-" & Kind;
for Object_Dir use "build-obj-" & Kind;
- for Library_Options use ("-lgmp");
+ for Library_Options use ("-lgmp", "-lmpfr");
for Languages use ("Ada", "C");
for Source_Dirs use ("src");
package Compiler is
============================================================
--- Makefile_test.gpr 62449fe7f11bab6e4e0f67d360e2937b6c5bdc16
+++ Makefile_test.gpr 5b16fc0985f7cf3c79de3a2cbb95c774431441ab
@@ -40,6 +40,6 @@ project Makefile_Test is
"-fstack-check"); -- stack overflow checking
end Compiler;
package Linker is
- for Default_Switches ("Ada") use ("-lgmp");
+ for Default_Switches ("Ada") use ("-lgmp", "-lmpfr");
end Linker;
end Makefile_Test;
============================================================
--- README da8bedff4125177565c105648c933f87f36a6afe
+++ README fd845526ab6c9759c000e2a413765ce0b2ebdba3
@@ -109,19 +109,19 @@
during optimization).
The Ada package "GMP.Binding" imports the C types and functions from
-gmp.h. The visible part contains only informations gathered in the
-normative part of the documentation. With GNAT, an array is passed by
-reference. This is compatible with a C one-element array like mpz_t.
-I hope this won't chage for a while, since "access" mode instead of
-"in, out, in out" modes would be much less readable.
+gmp.h. It is only intended as a step to build a controlled
+abstraction. I cannot see who would benefit from a thin binding like
+that anyway. The visible part should only contain informations
+gathered in the normative part of the documentation. With GNAT, an
+array is passed by reference. This is compatible with a C one-element
+array like mpz_t. I hope this won't chage for a while, since "access"
+mode instead of "in, out, in out" modes would be much less
+readable. Types like mpz_t should be limited, but this would make
+another dereference mandatory in the controlled abstraction (a
+significative performance hit), or make it limited too (many users
+would miss slow but readable "+" overloading), and I think both prices
+are too high.
-I cannot see who would benefit from a thin binding like that. It
-would be better in this case to use Ada-style explicit names and a
-limite type mpz_t. GMP.Binding is only intended as a step to build a
-controlled abstraction. Inlining the controlled version and avoiding
-assignments wherever possible should guarantee a minimal performance
-hit, while avoiding any risk of memory leak.
-
The private part and the body may vary with the gmp version. Namely,
they depend on mpz_t internal structure (for raw input) and GMP raw IO
format (for raw input and output). I cannot see how to rewrite the
@@ -143,19 +143,6 @@
programs depend on two tagged type and try to dispatch twice, too...
Suggestions welcome.
-I avoided creating a dynamic or static library because:
-
-- the code is relatively small, allthough the source is verbose.
- Importation of C procedures would not benefit from that.
-
-- inlining would be difficult. Allmost all procedures are short and
- would benefit from inlining if performance is needed.
-
-- It makes things easyier to adapt to specific needs (adding pragma
- inline, creating an array of mpz_t...), following other
- implementation choices while using GMP.Constants and GMP.Binding
- directly.
-
------------ Credits ------------
Thanks to Michael Roe and Gisle Saelensmind for providing their work
============================================================
--- TODO b32b943c2b288fb34c1de29a886be7adebdac096
+++ TODO b3f00aee8eb4f260012feef14bfec87d37f79812
@@ -5,7 +5,7 @@ We need roughly Aft + E digits. Any ide
claiming less digits if we can know the decimal exponent E in advance.
We need roughly Aft + E digits. Any idea to do that quick?
-make clean ; grep -i todo gmp/*
+make clean ; grep -ir todo *
Replace mpz_t with mpfr_t from libmpfr. Easy at this stage but
boring. That would make a wide range of new numerical functions
============================================================
--- demo/demo.adb a590f717388626b429d7179eacfcf638f4bf7777
+++ demo/demo.adb bf34ff41925069aec7cf3dd9322a343ed4841ac6
@@ -32,7 +32,7 @@ procedure Demo is
procedure Rationals_Demo;
procedure Float_Demo;
procedure Arithmetic_Demo;
- -- procedure Mpfr_Demo;
+ procedure Mpfr_Demo;
package IIC is new Big_Integers.Integer_Conversions (Integer);
package RIC is new Big_Rationals.Integer_Conversions (Integer);
@@ -198,11 +198,13 @@ procedure Demo is
pragma Assert (Is_Even (A) and Image (A) = " 0");
end Arithmetic_Demo;
- -- procedure Mpfr_Demo is
- -- F : Big_Float_Rounded;
- -- begin
- -- null;
- -- end Mpfr_Demo;
+ procedure Mpfr_Demo is
+ F : Big_Float_Rounded;
+ begin
+ pragma Unreferenced (F);
+ -- We just test that init and clear are well linked for now.
+ null;
+ end Mpfr_Demo;
use Ada.Text_IO;
begin
@@ -211,4 +213,5 @@ begin
Put ("Testing Rationals_Demo... "); Rationals_Demo; Put_Line ("done.");
Put ("Testing Float_Demo... "); Float_Demo; Put_Line ("done.");
Put ("Testing Arithmetic_Demo... "); Arithmetic_Demo; Put_Line ("done.");
+ Put ("Testing MPFR_Demo... "); Mpfr_Demo; Put_Line ("done.");
end Demo;
============================================================
--- src/gmp-binding.adb 55dd50075c4545c830d23b383720e36164fc9d7d
+++ src/gmp-binding.adb 8c75f82d5ebaa866f82fc3f2ebf2ef61492bf467
@@ -30,6 +30,7 @@ package body GMP.Binding is
Value : in Mp_Limb_T;
Count : in Natural := Bytes_Per_Limb - 1);
+ pragma Inline (Read_Limb);
procedure Read_Limb (Stream : access Ada.Streams.Root_Stream_Type'Class;
Value : out Mp_Limb_T;
Count : in unsigned := Bytes_Per_Limb - 1) is
@@ -40,6 +41,7 @@ package body GMP.Binding is
end loop;
end Read_Limb;
+ pragma Inline (Write_4_Bytes);
procedure Write_4_Bytes (Stream : access Ada.Streams.Root_Stream_Type'Class;
Value : in size_t) is
begin
@@ -48,6 +50,7 @@ package body GMP.Binding is
end loop;
end Write_4_Bytes;
+ pragma Inline (Write_Limb);
procedure Write_Limb (Stream : access Ada.Streams.Root_Stream_Type'Class;
Value : in Mp_Limb_T;
Count : in Natural := Bytes_Per_Limb - 1) is
============================================================
--- src/gnu_multiple_precision-aux.adb 9ecc5944ad79762d1986e615e8a1d22ed905987f
+++ src/gnu_multiple_precision-aux.adb 46192867bd94852a1e11dc8f04769900a110a12f
@@ -24,6 +24,29 @@ package body GNU_Multiple_Precision.Aux
-- Since we will allocate huge buffers, we have to allocate on the
-- heap to avoid stack overflow.
+ function Is_Digit (Item : Character;
+ Base : int)
+ return Boolean
+ is
+ begin
+ case Item is
+ when '0' .. '9' =>
+ return Character'Pos (Item) - Character'Pos ('0') < Base;
+ when 'A' .. 'F' =>
+ return Character'Pos (Item) - Character'Pos ('A') + 10 < Base;
+ when 'a' .. 'f' =>
+ return Character'Pos (Item) - Character'Pos ('a') + 10 < Base;
+ when others =>
+ return False;
+ end case;
+ end Is_Digit;
+
+ function Is_Blank (Item : Character) return Boolean
+ is
+ begin
+ return Item = ' ' or Item = ASCII.HT;
+ end Is_Blank;
+
procedure Put
(Put_Character : access procedure (Item : in Character);
Item : in Mpz_T;
@@ -147,6 +170,7 @@ package body GNU_Multiple_Precision.Aux
procedure Copy (Buffer : in char_array);
procedure Blank_And_Sign (Buffer : in char_array;
Filled_Fore : in Natural);
+ pragma Inline (Copy);
procedure Copy (Buffer : in char_array)
is
begin
@@ -226,8 +250,12 @@ package body GNU_Multiple_Precision.Aux
if Mp_Exp_T (Actual_Aft) <= Exponent then
for I in 1 .. Actual_Aft loop Put_Character.all ('0'); end loop;
else
- for I in 1 .. Exponent loop Put_Character.all ('0'); end loop;
- for I in Exponent + 1 .. Mp_Exp_T (Actual_Aft) loop Copy (Buffer.all); end loop;
+ for I in 1 .. Exponent loop
+ Put_Character.all ('0');
+ end loop;
+ for I in Exponent + 1 .. Mp_Exp_T (Actual_Aft) loop
+ Copy (Buffer.all);
+ end loop;
end if;
end if;
Free (Buffer);
@@ -239,29 +267,6 @@ package body GNU_Multiple_Precision.Aux
end if;
end Put;
- function Is_Digit (Item : Character;
- Base : int)
- return Boolean
- is
- begin
- case Item is
- when '0' .. '9' =>
- return Character'Pos (Item) - Character'Pos ('0') < Base;
- when 'A' .. 'F' =>
- return Character'Pos (Item) - Character'Pos ('A') + 10 < Base;
- when 'a' .. 'f' =>
- return Character'Pos (Item) - Character'Pos ('a') + 10 < Base;
- when others =>
- return False;
- end case;
- end Is_Digit;
-
- function Is_Blank (Item : Character) return Boolean
- is
- begin
- return Item = ' ' or Item = ASCII.HT;
- end Is_Blank;
-
package body Generic_Scan is
procedure Blanks_And_Sign (Buffer : in out char_array;
@@ -318,6 +323,7 @@ package body GNU_Multiple_Precision.Aux
end loop;
end Scan_Based_Numeral;
+ pragma Inline (Copy);
procedure Copy (Buffer : in out char_array;
Next_Out : in out size_t)
is
============================================================
--- src/gnu_multiple_precision-aux.ads 8f8f1360ec6e6e256b57fd8901588ef31f9a5c0d
+++ src/gnu_multiple_precision-aux.ads 2e3e7d02fad8c8e135910d1852502cf89c4c4489
@@ -14,12 +14,23 @@
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+with Interfaces.C; use Interfaces.C;
+with GMP.Binding; use GMP.Binding;
+
private package GNU_Multiple_Precision.Aux is
- -- Used for Generic_Text_IO.Put/Get procedures and
+
+ -- This private package isolates procedures used for
+ -- Generic_Text_IO.Put/Get procedures and
-- Big_Float/Integer.Image/Value functions.
pragma Preelaborate;
+ Unused_Character : constant Character := 'z';
+ -- Used for end of input by get procedures. It is also used as
+ -- default replacement in conversion from wide_character to
+ -- character. It may raise a Data_Error that would have been
+ -- undetected with a space.
+
procedure Put
(Put_Character : access procedure (Item : in Character);
Item : in Mpz_T;
@@ -54,4 +65,7 @@ private package GNU_Multiple_Precision.A
Width : in Natural);
end Generic_Scan;
+private
+ pragma Inline (Is_Blank);
+ pragma Inline (Is_Digit);
end GNU_Multiple_Precision.Aux;
============================================================
--- src/gnu_multiple_precision-big_floats.adb 0bf139a7891dc071c5e90af95ac828175c3e5ccf
+++ src/gnu_multiple_precision-big_floats.adb 14fe3dec5ba854537ce728d47e8695e8f60c10db
@@ -15,7 +15,8 @@ with Ada.Characters.Conversions;
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Ada.Characters.Conversions;
-with GNU_Multiple_Precision.Text_IO;
+with Interfaces.C; use Interfaces.C;
+with GMP.Binding; use GMP.Binding;
with GNU_Multiple_Precision.Aux;
package body GNU_Multiple_Precision.Big_Floats is
@@ -226,16 +227,31 @@ package body GNU_Multiple_Precision.Big_
return Ada.Characters.Conversions.To_Wide_Wide_String (Image (Arg));
end Wide_Wide_Image;
- function Value (Arg : String) return Big_Float
+ function Value (Item : String) return Big_Float
is
-- We need to detect Ada-style base and exponents, so
-- impossible to call mpf_get_str directly.
+ use GNU_Multiple_Precision.Aux;
Result : Big_Float;
- Last : Natural;
+ Last : Natural := Item'First;
+ Next : Character; -- = Item (Last - 1) in normal cases
+ procedure Consume;
+ procedure Consume is
+ begin
+ if Last <= Item'Last then
+ Next := Item (Last);
+ else
+ pragma Assert (Last = Item'Last + 1);
+ Next := Unused_Character;
+ end if;
+ Last := Last + 1;
+ end Consume;
+ package Scan is new Generic_Scan (Next, Consume);
begin
- GNU_Multiple_Precision.Text_IO.Get (Arg, Result, Last);
- for I in Last + 1 .. Arg'Last loop
- if Arg (I) /= ' ' and Arg (I) /= ASCII.HT then
+ Consume;
+ Scan.Get_Mpf_T (Result.Value, Item'Length);
+ for I in Last - 1 .. Item'Last loop
+ if Item (I) /= ' ' and Item (I) /= ASCII.HT then
raise Constraint_Error;
end if;
end loop;
@@ -244,18 +260,18 @@ package body GNU_Multiple_Precision.Big_
when others => raise Constraint_Error;
end Value;
- function Wide_Value (Arg : Wide_String) return Big_Float
+ function Wide_Value (Item : Wide_String) return Big_Float
is
-- This replacement character will cause an error in Value.
begin
- return Value (Ada.Characters.Conversions.To_String (Arg, 'z'));
+ return Value (Ada.Characters.Conversions.To_String (Item, 'z'));
end Wide_Value;
- function Wide_Wide_Value (Arg : Wide_Wide_String) return Big_Float
+ function Wide_Wide_Value (Item : Wide_Wide_String) return Big_Float
is
-- This replacement character will cause an error in Value.
begin
- return Value (Ada.Characters.Conversions.To_String (Arg, 'z'));
+ return Value (Ada.Characters.Conversions.To_String (Item, 'z'));
end Wide_Wide_Value;
function Max (Left, Right : Big_Float) return Big_Float
============================================================
--- src/gnu_multiple_precision-big_floats.ads f20e34f970beddf610c37d1ca9b591d7889df63b
+++ src/gnu_multiple_precision-big_floats.ads e89680a1e747faa37a9bdffdb904568eed8286ff
@@ -16,7 +16,7 @@ package GNU_Multiple_Precision.Big_Float
package GNU_Multiple_Precision.Big_Floats is
- pragma Elaborate_Body;
+ pragma Preelaborate;
function "<" (Left, Right : Big_Float) return Boolean;
function "<=" (Left, Right : Big_Float) return Boolean;
@@ -34,9 +34,9 @@ package GNU_Multiple_Precision.Big_Float
function Image (Arg : Big_Float) return String;
function Wide_Image (Arg : Big_Float) return Wide_String;
function Wide_Wide_Image (Arg : Big_Float) return Wide_Wide_String;
- function Value (Arg : String) return Big_Float;
- function Wide_Value (Arg : Wide_String) return Big_Float;
- function Wide_Wide_Value (Arg : Wide_Wide_String) return Big_Float;
+ function Value (Item : String) return Big_Float;
+ function Wide_Value (Item : Wide_String) return Big_Float;
+ function Wide_Wide_Value (Item : Wide_Wide_String) return Big_Float;
function Max (Left, Right : Big_Float) return Big_Float;
function Min (Left, Right : Big_Float) return Big_Float;
Machine_Radix : constant := 2;
@@ -139,6 +139,11 @@ package GNU_Multiple_Precision.Big_Float
function Fits_In_Num (Item : Big_Float) return Boolean;
function To_Num (Item : Big_Float) return Num;
-- Constraint_Error is raised if not Fits_In_Num (Item).
+ private
+ pragma Inline (Set);
+ pragma Inline (To_Big_Float);
+ pragma Inline (Fits_In_Num);
+ pragma Inline (To_Num);
end Integer_Conversions;
generic
@@ -150,6 +155,11 @@ package GNU_Multiple_Precision.Big_Float
function Fits_In_Num (Item : Big_Float) return Boolean;
function To_Num (Item : Big_Float) return Num;
-- Constraint_Error is raised if not Fits_In_Num (Item).
+ private
+ pragma Inline (Set);
+ pragma Inline (To_Big_Float);
+ pragma Inline (Fits_In_Num);
+ pragma Inline (To_Num);
end Modular_Conversions;
generic
@@ -166,6 +176,11 @@ package GNU_Multiple_Precision.Big_Float
-- The Mantissa is in The range 0.5<|D|< 1 and
-- Op = Mantissa * 2 ** Exponent = (Truncated towards 0) Op
-- Value. If Op is zero, both are zero.
+ private
+ pragma Inline (Set);
+ pragma Inline (To_Big_Float);
+ pragma Inline (To_Num);
+ pragma Inline (Split_Mantissa_Exponent);
end Float_Conversions;
procedure Set (Rop : in out Big_Integer;
@@ -174,4 +189,50 @@ package GNU_Multiple_Precision.Big_Float
procedure Set (Rop : in out Big_Float;
Op : in Big_Integer);
+private
+
+ pragma Inline ("<=");
+ pragma Inline ("<");
+ pragma Inline (">=");
+ pragma Inline (">");
+ pragma Inline ("-");
+ pragma Inline ("/");
+ pragma Inline ("*");
+ pragma Inline ("**");
+ pragma Inline ("+");
+ pragma Inline ("abs");
+ pragma Inline (Absolute_Value);
+ pragma Inline (Add);
+ pragma Inline (Ceiling);
+ pragma Inline (Compose);
+ pragma Inline (Default_Precision);
+ pragma Inline (Divide);
+ pragma Inline (Divide_2_Exp);
+ pragma Inline (Equals);
+ pragma Inline (Exponent);
+ pragma Inline (Exponentiate);
+ pragma Inline (Floor);
+ pragma Inline (Fraction);
+ pragma Inline (Is_Integer);
+ pragma Inline (Max);
+ pragma Inline (Min);
+ pragma Inline (Multiply);
+ pragma Inline (Multiply_2_Exp);
+ pragma Inline (Negate);
+ pragma Inline (Precision);
+ pragma Inline (Relative_Difference);
+ pragma Inline (Set);
+ pragma Inline (Set_Default_Precision);
+ pragma Inline (Set_Precision);
+ pragma Inline (Set_Precision_Raw);
+ pragma Inline (Sign);
+ pragma Inline (Square_Root);
+ pragma Inline (Subtract);
+ pragma Inline (Swap);
+ pragma Inline (Truncation);
+ pragma Inline (Wide_Image);
+ pragma Inline (Wide_Value);
+ pragma Inline (Wide_Wide_Image);
+ pragma Inline (Wide_Wide_Value);
+
end GNU_Multiple_Precision.Big_Floats;
============================================================
--- src/gnu_multiple_precision-big_integers.adb c4f6e71182c2c967bfe0ef0619c8afcc467858bc
+++ src/gnu_multiple_precision-big_integers.adb 70e3afdba1461e841edd740eb9f9dba83c27973d
@@ -16,7 +16,8 @@ with Ada.Characters.Conversions;
with Ada.Unchecked_Conversion;
with Ada.Characters.Conversions;
-with GNU_Multiple_Precision.Text_IO;
+with Interfaces.C; use Interfaces.C;
+with GMP.Binding; use GMP.Binding;
with GNU_Multiple_Precision.Aux;
package body GNU_Multiple_Precision.Big_Integers is
@@ -197,10 +198,25 @@ package body GNU_Multiple_Precision.Big_
is
-- We need to detect Ada-style base and exponents.
-- So impossible to call mpz_get_str directly.
+ use GNU_Multiple_Precision.Aux;
Result : Big_Integer;
- Last : Natural;
+ Last : Natural := Item'First;
+ Next : Character; -- = Item (Last - 1) in normal cases
+ procedure Consume;
+ procedure Consume is
+ begin
+ if Last <= Item'Last then
+ Next := Item (Last);
+ else
+ pragma Assert (Last = Item'Last + 1);
+ Next := Unused_Character;
+ end if;
+ Last := Last + 1;
+ end Consume;
+ package Scan is new Generic_Scan (Next, Consume);
begin
- GNU_Multiple_Precision.Text_IO.Get (Item, Result, Last);
+ Consume;
+ Scan.Get_Mpz_T (Result.Value, Item'Length);
for I in Last + 1 .. Item'Last loop
if Item (I) /= ' ' and Item (I) /= ASCII.HT then
raise Constraint_Error;
============================================================
--- src/gnu_multiple_precision-big_integers.ads 216f74f0fec190f4fe3788ba3c11804235bc9e5a
+++ src/gnu_multiple_precision-big_integers.ads c9b80a78af25d5342e98ce0c2d00c2f07f667fea
@@ -16,7 +16,7 @@ package GNU_Multiple_Precision.Big_Integ
package GNU_Multiple_Precision.Big_Integers is
- pragma Elaborate_Body;
+ pragma Preelaborate;
function "<" (Left, Right : Big_Integer) return Boolean;
function "<=" (Left, Right : Big_Integer) return Boolean;
@@ -348,6 +348,11 @@ package GNU_Multiple_Precision.Big_Integ
function Fits_In_Num (Item : Big_Integer) return Boolean;
function To_Num (Item : Big_Integer) return Num;
-- Constraint_Error is raised if not Fits_In_Num (Item).
+ private
+ pragma Inline (Set);
+ pragma Inline (To_Big_Integer);
+ pragma Inline (Fits_In_Num);
+ pragma Inline (To_Num);
end Integer_Conversions;
generic
@@ -359,6 +364,11 @@ package GNU_Multiple_Precision.Big_Integ
function Fits_In_Num (Item : Big_Integer) return Boolean;
function To_Num (Item : Big_Integer) return Num;
-- Constraint_Error is raised if not Fits_In_Num (Item).
+ private
+ pragma Inline (Set);
+ pragma Inline (To_Big_Integer);
+ pragma Inline (Fits_In_Num);
+ pragma Inline (To_Num);
end Modular_Conversions;
generic
@@ -377,6 +387,12 @@ package GNU_Multiple_Precision.Big_Integ
-- The Mantissa is in The range 0.5<|D|< 1 and
-- Op = Mantissa * 2 ** Exponent = (Truncated towards 0) Op
-- Value. If Op is zero, both are zero.
+ private
+ pragma Inline (Set);
+ pragma Inline (To_Big_Integer);
+ pragma Inline (Fits_In_Num);
+ pragma Inline (To_Num);
+ pragma Inline (Split_Mantissa_Exponent);
end Float_Conversions;
private
@@ -387,4 +403,87 @@ private
Prime => 2);
for Prime_Status'Size use Interfaces.C.int'Size;
+ pragma Inline ("<=");
+ pragma Inline ("<");
+ pragma Inline (">=");
+ pragma Inline (">");
+ pragma Inline ("-");
+ pragma Inline ("/");
+ pragma Inline ("*");
+ pragma Inline ("**");
+ pragma Inline ("+");
+ pragma Inline ("abs");
+ pragma Inline (Absolute_Value);
+ pragma Inline (Add);
+ pragma Inline (Add_A_Product);
+ pragma Inline ("and");
+ pragma Inline (Binomial);
+ pragma Inline (Bit_Is_Set);
+ pragma Inline (Clear_Bit);
+ pragma Inline (Complement_Bit);
+ pragma Inline (Divide);
+ pragma Inline (Divide_2_Exp);
+ pragma Inline (Divide_Exactly);
+ pragma Inline (Exponentiate);
+ pragma Inline (Factorial);
+ pragma Inline (Fibonacci_2_Numbers);
+ pragma Inline (Fibonacci_Number);
+ pragma Inline (Greatest_Common_Divisor);
+ pragma Inline (Hamming_Distance);
+ pragma Inline (Invert);
+ pragma Inline (Is_Congruent);
+ pragma Inline (Is_Congruent_2_Exp);
+ pragma Inline (Is_Divisible);
+ pragma Inline (Is_Divisible_2_Exp);
+ pragma Inline (Is_Even);
+ pragma Inline (Is_Odd);
+ pragma Inline (Is_Perfect_Power);
+ pragma Inline (Is_Perfect_Square);
+ pragma Inline (Jacobi);
+ pragma Inline (Kronecker);
+ pragma Inline (Least_Common_Multiple);
+ pragma Inline (Legendre);
+ pragma Inline (Logical_And);
+ pragma Inline (Logical_Or);
+ pragma Inline (Logical_Xor);
+ pragma Inline (Lucas_2_Numbers);
+ pragma Inline (Lucas_Number);
+ pragma Inline (Max);
+ pragma Inline (Min);
+ pragma Inline ("mod");
+ pragma Inline (Modulo);
+ pragma Inline (Multiply);
+ pragma Inline (Multiply_2_Exp);
+ pragma Inline (Negate);
+ pragma Inline (Next_Prime);
+ pragma Inline (One_S_Complement);
+ pragma Inline ("or");
+ pragma Inline (Population_Count);
+ pragma Inline (Pred);
+ pragma Inline (Probably_Prime);
+ pragma Inline (Reallocate);
+ pragma Inline ("rem");
+ pragma Inline (Remainder);
+ pragma Inline (Remainder_2_Exp);
+ pragma Inline (Remove);
+ pragma Inline (Root);
+ pragma Inline (Root_Remainder);
+ pragma Inline (Scan0);
+ pragma Inline (Scan1);
+ pragma Inline (Set);
+ pragma Inline (Set_Bit);
+ pragma Inline (Sign);
+ pragma Inline (Size_In_Base);
+ pragma Inline (Square_Root);
+ pragma Inline (Square_Root_Remainder);
+ pragma Inline (Subtract);
+ pragma Inline (Subtract_A_Product);
+ pragma Inline (Succ);
+ pragma Inline (Swap);
+ pragma Inline (Wide_Image);
+ pragma Inline (Wide_Value);
+ pragma Inline (Wide_Wide_Image);
+ pragma Inline (Wide_Wide_Value);
+ pragma Inline ("xor");
+
end GNU_Multiple_Precision.Big_Integers;
============================================================
--- src/gnu_multiple_precision-big_rationals.adb 24de5d972adc95e47640f57d4af53c0157d93d54
+++ src/gnu_multiple_precision-big_rationals.adb 36a925148a723282fcf71d5952f0d41d56cc8d30
@@ -15,12 +15,12 @@ with Ada.Characters.Conversions;
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Ada.Characters.Conversions;
+with Interfaces.C; use Interfaces.C;
+with GMP.Binding; use GMP.Binding;
with GNU_Multiple_Precision.Aux;
package body GNU_Multiple_Precision.Big_Rationals is
- use Ada.Characters.Conversions;
-
procedure Canonicalize (Op : in out Big_Rational)
is
begin
============================================================
--- src/gnu_multiple_precision-big_rationals.ads 41f51fb7229d8f24a3b2783fccdeb6ee0f354f86
+++ src/gnu_multiple_precision-big_rationals.ads 610ec4b18a5a298bc4cca392c306684ade36b447
@@ -24,9 +24,8 @@ package GNU_Multiple_Precision.Big_Ratio
procedure Canonicalize (Op : in out Big_Rational);
- procedure Set
- (Rop : in out Big_Rational;
- Op : in Big_Rational);
+ procedure Set (Rop : in out Big_Rational;
+ Op : in Big_Rational);
function "+" (Right : Big_Rational) return Big_Rational;
procedure Set (Rop : in out Big_Rational;
@@ -100,7 +99,7 @@ package GNU_Multiple_Precision.Big_Ratio
generic
type Num is range <>;
package Integer_Conversions is
- subtype Positive_Num is Num range 1 .. Num'Last;
+ subtype Positive_Num is Num range 1 .. Num'Last;
procedure Set
(Rop : in out Big_Rational;
Numerator : in Num;
@@ -126,6 +125,18 @@ package GNU_Multiple_Precision.Big_Ratio
Right_Numerator : Num;
Right_Denominator : Positive_Num)
return A_Comparison;
+
+ private
+ pragma Inline (Set);
+ pragma Inline (To_Big_Rational);
+ pragma Inline (Fits_In_Num);
+ pragma Inline (To_Num);
+ pragma Inline ("=");
+ pragma Inline ("<=");
+ pragma Inline ("<");
+ pragma Inline (">=");
+ pragma Inline (">");
+ pragma Inline (Compare);
end Integer_Conversions;
generic
@@ -136,6 +147,10 @@ package GNU_Multiple_Precision.Big_Ratio
Op : in Num);
function To_Big_Rational (Item : Num) return Big_Rational;
function To_Num (Item : Big_Rational) return Num;
+ private
+ pragma Inline (Set);
+ pragma Inline (To_Big_Rational);
+ pragma Inline (To_Num);
end Float_Conversions;
procedure Set (Rop : in out Big_Integer;
@@ -171,4 +186,39 @@ package GNU_Multiple_Precision.Big_Ratio
-- TODO: optimize a bit...
-- TODO (Wide) Value
+private
+
+ pragma Inline ("<=");
+ pragma Inline ("<");
+ pragma Inline (">=");
+ pragma Inline (">");
+ pragma Inline ("-");
+ pragma Inline ("/");
+ pragma Inline ("*");
+ pragma Inline ("**");
+ pragma Inline ("+");
+ pragma Inline ("abs");
+ pragma Inline (Absolute_Value);
+ pragma Inline (Add);
+ pragma Inline (Canonicalize);
+ pragma Inline (Denominator);
+ pragma Inline (Divide);
+ pragma Inline (Get_Denominator);
+ pragma Inline (Get_Numerator);
+ pragma Inline (Invert);
+ pragma Inline (Multiply);
+ pragma Inline (Multiply_2exp);
+ pragma Inline (Negate);
+ pragma Inline (Numerator);
+ pragma Inline (Set);
+ pragma Inline (Set_Denominator);
+ pragma Inline (Set_Numerator);
+ pragma Inline (Sign);
+ pragma Inline (Subtract);
+ pragma Inline (Swap);
+ pragma Inline (To_Big_Integer);
+ pragma Inline (To_Big_Rational);
+ pragma Inline (Wide_Image);
+ pragma Inline (Wide_Wide_Image);
+
end GNU_Multiple_Precision.Big_Rationals;
============================================================
--- src/gnu_multiple_precision-generic_text_io.adb 5a3251bd00500d84d4c4a577b6b5ea8bf4a25ffc
+++ src/gnu_multiple_precision-generic_text_io.adb ec0a9815d96bcdb88e3f9d725d990e3ba0dbb638
@@ -15,22 +15,12 @@ with Ada.IO_Exceptions;
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Ada.IO_Exceptions;
-with GNU_Multiple_Precision.Aux;
+with GNU_Multiple_Precision.Aux; use GNU_Multiple_Precision.Aux;
package body GNU_Multiple_Precision.Generic_Text_IO is
- Unused_Character : constant Character := 'z';
-
- -- Used for end of input by get procedures. It is also used as
- -- default replacement in conversion from wide_character to
- -- character. It may raise a Data_Error that would have been
- -- undetected with a space.
-
procedure Skip_Blanks_And_Separators (File : in File_Type);
-
-
-
procedure Skip_Blanks_And_Separators (File : in File_Type)
is
Item : Maybe_Character;
@@ -43,7 +33,7 @@ package body GNU_Multiple_Precision.Gene
if End_Of_Page (File) then
Skip_Page (File);
end if;
- elsif GNU_Multiple_Precision.Aux.Is_Blank (To_Character (Item, Unused_Character)) then
+ elsif Is_Blank (To_Character (Item, Unused_Character)) then
Get (File, Item);
else
exit;
@@ -77,7 +67,7 @@ package body GNU_Multiple_Precision.Gene
Next := Unused_Character;
end if;
end Consume;
- package Scan is new GNU_Multiple_Precision.Aux.Generic_Scan (Next, Consume);
+ package Scan is new Generic_Scan (Next, Consume);
Temp : Maybe_Character;
begin
if Width /= 0 then
@@ -123,7 +113,7 @@ package body GNU_Multiple_Precision.Gene
end if;
Last := Last + 1;
end Consume;
- package Scan is new GNU_Multiple_Precision.Aux.Generic_Scan (Next, Consume);
+ package Scan is new Generic_Scan (Next, Consume);
begin
Last := From'First;
Consume;
@@ -144,7 +134,7 @@ package body GNU_Multiple_Precision.Gene
Put (File, To_Maybe_Character (C));
end Put_Character;
begin
- GNU_Multiple_Precision.Aux.Put (Put_Character'Access, Item.Value, Width, Base);
+ Put (Put_Character'Access, Item.Value, Width, Base);
end Put;
procedure Put
@@ -173,7 +163,7 @@ package body GNU_Multiple_Precision.Gene
Next := Next + 1;
end Put_Character;
begin
- GNU_Multiple_Precision.Aux.Put (Put_Character'Access, Item.Value, To'Length, Base);
+ Put (Put_Character'Access, Item.Value, To'Length, Base);
end Put;
procedure Put
@@ -189,7 +179,7 @@ package body GNU_Multiple_Precision.Gene
Put (File, To_Maybe_Character (C));
end Put_Character;
begin
- GNU_Multiple_Precision.Aux.Put (Put_Character'Access, Item.Value, Width, Base);
+ Put (Put_Character'Access, Item.Value, Width, Base);
end Put;
procedure Put
@@ -218,7 +208,7 @@ package body GNU_Multiple_Precision.Gene
Next := Next + 1;
end Put_Character;
begin
- GNU_Multiple_Precision.Aux.Put (Put_Character'Access, Item.Value, To'Length, Base);
+ Put (Put_Character'Access, Item.Value, To'Length, Base);
end Put;
procedure Get (File : in File_Type;
@@ -244,7 +234,7 @@ package body GNU_Multiple_Precision.Gene
Next := Unused_Character;
end if;
end Consume;
- package Scan is new GNU_Multiple_Precision.Aux.Generic_Scan (Next, Consume);
+ package Scan is new Generic_Scan (Next, Consume);
begin
if Width /= 0 then
Actual_Width := Width;
@@ -289,7 +279,7 @@ package body GNU_Multiple_Precision.Gene
end if;
Last := Last + 1;
end Consume;
- package Scan is new GNU_Multiple_Precision.Aux.Generic_Scan (Next, Consume);
+ package Scan is new Generic_Scan (Next, Consume);
begin
Last := From'First;
Consume;
@@ -311,7 +301,7 @@ package body GNU_Multiple_Precision.Gene
Put (File, To_Maybe_Character (C));
end Put_Character;
begin
- GNU_Multiple_Precision.Aux.Put (Put_Character'Access, Item.Value, Fore, Aft, Exp);
+ Put (Put_Character'Access, Item.Value, Fore, Aft, Exp);
end Put;
procedure Put
@@ -342,7 +332,7 @@ package body GNU_Multiple_Precision.Gene
Next := Next + 1;
end Put_Character;
begin
- GNU_Multiple_Precision.Aux.Put (Put_Character'Access, Item.Value, 0, Aft, Exp);
+ Put (Put_Character'Access, Item.Value, 0, Aft, Exp);
To := (Next .. To'Last => To_Maybe_Character (' '))
& To (To'First .. Next - 1);
end Put;
============================================================
--- src/gnu_multiple_precision-random_numbers.adb 5b4e051cab8ea9c610f074f8e196e7fc919e7ec0
+++ src/gnu_multiple_precision-random_numbers.adb 72d457ef3948c47997b0c1d2ccf394b5150f5d69
@@ -15,6 +15,8 @@ with Ada.Calendar;
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
with Ada.Calendar;
+with Interfaces.C; use Interfaces.C;
+with GMP.Binding; use GMP.Binding;
package body GNU_Multiple_Precision.Random_Numbers is
============================================================
--- src/gnu_multiple_precision-random_numbers.ads d9d5c61324f56c543ef1253908b771778eab9b33
+++ src/gnu_multiple_precision-random_numbers.ads 2fbd755e97cb528bd3148630919a53d47c6a8467
@@ -84,4 +84,16 @@ private
Gen_State : State;
end record;
+ pragma Inline (Adjust);
+ pragma Inline (Finalize);
+ pragma Inline (Generate_Corner_Case_Random_Bytes);
+ pragma Inline (Initialize);
+ pragma Inline (Random);
+ pragma Inline (Random_2exp);
+ pragma Inline (Reset);
+ pragma Inline (Reset_Linear_Congruential);
+ pragma Inline (Reset_Linear_Congruential_2exp_Size);
+ pragma Inline (Reset_Mersenne_Twister);
+ pragma Inline (Save);
+
end GNU_Multiple_Precision.Random_Numbers;
============================================================
--- src/gnu_multiple_precision.adb 40679ee47f955c2374deda949d02b0b905d5da19
+++ src/gnu_multiple_precision.adb ec81f2de3b5e325148874fe377d32155433a8209
@@ -14,6 +14,9 @@
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+with Interfaces.C; use Interfaces.C;
+with GMP.Binding; use GMP.Binding;
+
package body GNU_Multiple_Precision is
overriding procedure Initialize (Object : in out Big_Integer)
@@ -30,12 +33,12 @@ package body GNU_Multiple_Precision is
end Adjust;
overriding procedure Finalize (Object : in out Big_Integer)
- is
+ is
begin
Mpz_Clear (Object.Value);
end Finalize;
- function "=" (Left, Right : Big_Integer) return Boolean
+ overriding function "=" (Left, Right : Big_Integer) return Boolean
is
begin
return Mpz_Cmp (Left.Value, Right.Value) = 0;
@@ -61,7 +64,7 @@ package body GNU_Multiple_Precision is
Mpq_Clear (Object.Value);
end Finalize;
- function "=" (Left, Right : in Big_Rational) return Boolean
+ overriding function "=" (Left, Right : in Big_Rational) return Boolean
is
begin
return Mpq_Equal (Left.Value, Right.Value) /= 0;
@@ -105,7 +108,7 @@ package body GNU_Multiple_Precision is
Mpf_Clear (Object.Value);
end Finalize;
- function "=" (Left, Right : Big_Float) return Boolean
+ overriding function "=" (Left, Right : Big_Float) return Boolean
is
begin
return Mpf_Cmp (Left.Value, Right.Value) = 0;
@@ -158,45 +161,43 @@ package body GNU_Multiple_Precision is
pragma Unreferenced (Z);
end Write;
- -- overriding procedure Initialize (Object : in out Big_Float_Rounded)
- -- is
- -- begin
- -- Mpfr_Init (Object.Value);
- -- end Initialize;
+ overriding procedure Initialize (Object : in out Big_Float_Rounded)
+ is
+ begin
+ Mpfr_Init (Object.Value);
+ end Initialize;
- -- overriding procedure Adjust (Object : in out Big_Float_Rounded)
- -- is
- -- Temp : Mpfr_T := Object.Value;
- -- begin
- -- Mpfr_Init (Object.Value);
- -- Mpfr_Set (Object.Value, Temp, Gmp_Rndn);
- -- end Adjust;
+ -- overriding procedure Adjust (Object : in out Big_Float_Rounded)
+ -- is
+ -- begin
+ -- null;
+ -- end Adjust;
- -- overriding procedure Finalize (Object : in out Big_Float_Rounded)
- -- is
- -- begin
- -- Mpfr_Clear (Object.Value);
- -- end Finalize
+ overriding procedure Finalize (Object : in out Big_Float_Rounded)
+ is
+ begin
+ Mpfr_Clear (Object.Value);
+ end Finalize;
- -- function "=" (Left, Right : Big_Float_Rounded) return Boolean
- -- is
- -- begin
- -- return True;
- -- end "=";
+ -- overriding function "=" (Left, Right : Big_Float_Rounded) return Boolean
+ -- is
+ -- begin
+ -- return True;
+ -- end "=";
- -- procedure Read (Stream : access Ada.Streams.Root_Stream_Type'Class;
- -- Item : out Big_Float_Rounded)
- -- is
- -- begin
- -- null;
- -- end Read;
+ -- procedure Read (Stream : access Ada.Streams.Root_Stream_Type'Class;
+ -- Item : out Big_Float_Rounded)
+ -- is
+ -- begin
+ -- null;
+ -- end Read;
- -- procedure Write (Stream : access Ada.Streams.Root_Stream_Type'Class;
- -- Item : in Big_Float_Rounded)
- -- is
- -- begin
- -- null;
- -- end Write;
+ -- procedure Write (Stream : access Ada.Streams.Root_Stream_Type'Class;
+ -- Item : in Big_Float_Rounded)
+ -- is
+ -- begin
+ -- null;
+ -- end Write;
function Identity (Item : in Character)
return Character
============================================================
--- src/gnu_multiple_precision.ads 176c263393d12be4c6504f127ffa42e79881f072
+++ src/gnu_multiple_precision.ads 3bf19adb7549eb141f6c009242662efaad43574e
@@ -29,7 +29,7 @@ package GNU_Multiple_Precision is
type Big_Integer is private;
type Big_Rational is private;
type Big_Float is private;
- -- type Big_Float_Rounded is private;
+ type Big_Float_Rounded is private;
-- Input, Output, Read and Write are handled by representation
-- clauses.
@@ -39,23 +39,20 @@ package GNU_Multiple_Precision is
-- private data from one type to another in bodies (this is needed
-- to call conversion fonctions).
+
+ -- Used for defining Text_IO as an instantiation of a generic.
function Identity (Item : in Character) return Character;
function Identity (Item : in Character;
Substitute : in Character := ' ')
return Character;
-- Returns the provided Item unmodified.
- -- Used for defining Text_IO as an instantiation of a generic.
private
- -- They will be needed for each body anyway...
- use Interfaces.C;
- use GMP.Binding;
+ -- Equality must be overridden in the same specification.
- -- Equality must be overloaded in the same specification.
-
type Big_Integer is new Ada.Finalization.Controlled with record
- Value : Mpz_T;
+ Value : GMP.Binding.Mpz_T;
end record;
overriding procedure Initialize (Object : in out Big_Integer);
@@ -68,7 +65,7 @@ private
-- GNAT's black magic.
type Big_Rational is new Ada.Finalization.Controlled with record
- Value : Mpq_T;
+ Value : GMP.Binding.Mpq_T;
end record;
overriding procedure Initialize (Object : in out Big_Rational);
@@ -85,7 +82,7 @@ private
for Big_Rational'Write use Write;
type Big_Float is new Ada.Finalization.Controlled with record
- Value : Mpf_T;
+ Value : GMP.Binding.Mpf_T;
end record;
overriding procedure Initialize (Object : in out Big_Float);
@@ -101,21 +98,27 @@ private
for Big_Float'Read use Read;
for Big_Float'Write use Write;
- -- type Big_Float_Rounded is new Ada.Finalization.Controlled with record
- -- Value : Mpfr_T;
- -- end record;
+ type Big_Float_Rounded is new Ada.Finalization.Controlled with record
+ Value : GMP.Binding.Mpfr_T;
+ end record;
- -- overriding procedure Initialize (Object : in out Big_Float_Rounded);
- -- overriding procedure Adjust (Object : in out Big_Float_Rounded);
- -- overriding procedure Finalize (Object : in out Big_Float_Rounded);
- -- overriding function "=" (Left, Right : Big_Float_Rounded) return Boolean;
+ overriding procedure Initialize (Object : in out Big_Float_Rounded);
+ -- overriding procedure Adjust (Object : in out Big_Float_Rounded);
+ overriding procedure Finalize (Object : in out Big_Float_Rounded);
+ -- overriding function "=" (Left, Right : Big_Float_Rounded) return Boolean;
- -- procedure Read (Stream : access Ada.Streams.Root_Stream_Type'Class;
- -- Item : out Big_Float_Rounded);
- -- procedure Write (Stream : access Ada.Streams.Root_Stream_Type'Class;
- -- Item : in Big_Float_Rounded);
+ -- procedure Read (Stream : access Ada.Streams.Root_Stream_Type'Class;
+ -- Item : out Big_Float_Rounded);
+ -- procedure Write (Stream : access Ada.Streams.Root_Stream_Type'Class;
+ -- Item : in Big_Float_Rounded);
- -- for Big_Float_Rounded'Read use Read;
- -- for Big_Float_Rounded'Write use Write;
+ -- for Big_Float_Rounded'Read use Read;
+ -- for Big_Float_Rounded'Write use Write;
+ pragma Inline ("=");
+ pragma Inline (Adjust);
+ pragma Inline (Finalize);
+ pragma Inline (Identity);
+ pragma Inline (Initialize);
+
end GNU_Multiple_Precision;