comp.lang.ada
 help / color / mirror / Atom feed
From: "Gautier Write-only-address" <gautier_niouzes@hotmail.com>
To: comp.lang.ada@ada.eu.org
Subject: Re: bignums
Date: Tue, 24 Jul 2001 20:16:23 +0000
Date: 2001-07-24T20:16:23+00:00	[thread overview]
Message-ID: <mailman.996005853.13448.comp.lang.ada@ada.eu.org> (raw)

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 <taw@pb220.legnica.sdi.tpnet.pl> 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




             reply	other threads:[~2001-07-24 20:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-24 20:16 Gautier Write-only-address [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-07-24  0:28 bignums Tomasz Wegrzanowski
2001-07-24  6:36 ` bignums Gerhard Häring
2001-07-24 15:22 ` bignums Ehud Lamm
2001-07-24 17:51   ` bignums Gisle Sælensminde
2001-07-24 17:59     ` bignums Ehud Lamm
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox