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=-0.3 required=5.0 tests=BAYES_00,CTE_8BIT_MISMATCH, FREEMAIL_FROM,HELO_NO_DOMAIN,MAILING_LIST_MULTI, PP_MIME_FAKE_ASCII_TEXT,RDNS_NONE,SPOOFED_FREEMAIL_NO_RDNS autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,2d4b24a39e4836e7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-24 13:17:44 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!opentransit.net!jussieu.fr!enst!enst.fr!not-for-mail From: "Gautier Write-only-address" Newsgroups: comp.lang.ada Subject: Re: bignums Date: Tue, 24 Jul 2001 20:16:23 +0000 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: avanie.enst.fr 996005862 71109 137.194.161.2 (24 Jul 2001 20:17:42 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 24 Jul 2001 20:17:42 +0000 (UTC) To: comp.lang.ada@ada.eu.org Return-Path: X-Originating-IP: [212.35.34.200] X-OriginalArrivalTime: 24 Jul 2001 20:16:23.0709 (UTC) FILETIME=[8290F4D0:01C1147D] Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.4 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:10535 Date: 2001-07-24T20:16:23+00:00 Gisle: >A better Idea then would be to write a new binding where one >could use Ada's capability to allocate the numbers on the stack. >I was member of a mailing list where we started looking at this, >but it ended because all of us were having (final) exams at the time. Exact, he-he... Meanwhile I advertise for my multi-precision pack (on BigNum page) that fully uses this Ada feature, since there is absolutely no allocation in the library - of course one can allocate multi-int variables for using them... ___________________________________________________ Gautier -- http://www.diax.ch/users/gdm/gsoft.htm NB: Do not answer to sender address, visit the Web site! Ne r�pondez pas � l'exp�diteur, visitez le site ouaibe! >From: gisle@apal.ii.uib.no (Gisle S�lensminde) >Reply-To: comp.lang.ada@ada.eu.org >To: comp.lang.ada@ada.eu.org >Subject: Re: bignums >Date: 24 Jul 2001 17:51:36 GMT > >In article <9jk3th$knr$1@news.huji.ac.il>, Ehud Lamm wrote: > >Tomasz Wegrzanowski wrote in message > >news:9jifep$kf0$2@news.tpi.pl... > >> Is there any unlimited-size-integer thing in Ada, > >> something like gmp in C ? > > > >There are two issues here. First, support for bignums: there are some > >package around, and it isn't too hard to hack something. > >The second issue is efficiency. I seem to recall that GMP is highly > >optimized, uses assembly language etc. So one may actually want or hope >for > >a binding to GMP. I don't know a thing about it, but I did find this web > >page http://www.chiark.greenend.org.uk/~mroe/Ada/GMP/. Maybe someone >knows > >more about the current status of this. > >I also wrote a binding for GMP, and have finished the integer part of it, >including a thick binding, but not for rationals and floats. I had plans >to develop the rest when I have made the thick binding for floats as >well, but the project stop since I personally only needed integers, and >the float stuff seems to be crap, so I stoped there without finishing the >project. I if anybody are interested I can put the bits together and >relese it. > >There is one problem by making a thick binding for a library like GMP. >Of cause the most natural way of making a thick binding is to use >operator overloading, so that you can make code like "A = B + C;". > >The problem is that each new GMP number is dynamically allocated, >and for uing it with operator overloading you must make a controlled >type and allocate a new new number for each operation. This leads to >very slow code, compared to the thin binding. In my fibonacci test >there were a 1:6 difference between them. > >A better Idea then would be to write a new binding where one could use >Ada's capability to allocate the numbers on the stack. I was member of a >mailing list where we started looking at this, but it ended because >all of us were having (final) exams at the time. > >- Gisle > > > > > > >HTH > > > >Ehud Lamm > > > > > > >-- >-- >Gisle S�lensminde ( gisle@ii.uib.no ) > >With sufficient thrust, pigs fly just fine. However, this is not >necessarily a good idea. It is hard to be sure where they are going >to land, and it could be dangerous sitting under them as they fly >overhead. (from RFC 1925) >_______________________________________________ >comp.lang.ada mailing list >comp.lang.ada@ada.eu.org >http://ada.eu.org/mailman/listinfo/comp.lang.ada _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp