From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,245c84afd1e393ce X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g14g2000cwa.googlegroups.com!not-for-mail From: "Craig Carey " Newsgroups: comp.lang.ada Subject: Re: What about big integers in Ada 2005? Date: 16 Sep 2005 20:43:15 -0700 Organization: http://groups.google.com Message-ID: <1126928595.923839.231970@g14g2000cwa.googlegroups.com> References: <1126881206.417473.259360@g47g2000cwa.googlegroups.com> NNTP-Posting-Host: 210.185.8.19 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1126928603 24145 127.0.0.1 (17 Sep 2005 03:43:23 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 17 Sep 2005 03:43:23 +0000 (UTC) In-Reply-To: <1126881206.417473.259360@g47g2000cwa.googlegroups.com> User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.7) Gecko/20050414,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g14g2000cwa.googlegroups.com; posting-host=210.185.8.19; posting-account=VAk6zg0AAAAB8m7bE8j11Y9JsY1KL2hL Xref: g2news1.google.com comp.lang.ada:4815 Date: 2005-09-16T20:43:15-07:00 List-Id: On 16 Sep 2005 07:33:26 -0700, gautier_niouzes@hotmail.com wrote: ... >> disappointed - Ada95 does not support integers of ANY size, ... >on the following site you'll find a bunch of downloadble packages: > >http://www.chez.com/bignumber/ That webpage is out of date since not referring to my Ada bindings to the GNU GMP big numbers package: http://tope.tigris.org/source/browse/tope/src/Gmp/gmp_2k4.ads?view=markup My code replaces the GMP Ada bindings named at the chez.com website. >BTW, the freshest version of my multi-precision integers are >in mathpaqs.zip on my Ada page below. File "multi_precision_integers.ads" (*.adb file is 40kb): | subtype Basic_int is Integer; | type Index_int is new integer; | | type Block_array is array( index_int range <> ) of Basic_int; | | type Multi_int(n: Index_int) is record | blk: Block_array( 0..n ); -- the n blocks with ABSOLUTE v... | neg: Boolean; -- negative flag | zero: Boolean:=True; -- zero flag (supercedes the ot... | last_used: Index_int; -- the others blocks are suppos... | end record; (The GNAT style checker won't accept that code fragment.) GMP did compile well with GCC 2.8.1 (which was needed since combining GNAT 2.8.1 with a GCC C (not C++) of a different version, in Windows, led to botched parameter passing. There was a message about C/C++ to Ada. A way to get that running is to have two Ada YACC (AdaGOOP) parsers in series. Maybe Mr de Montmollin can produce a program to convert C body files into faulty Ada. Craig Carey, Auckland city