delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/04/19:37:05

X-Authentication-Warning: ieva01.lanet.lv: pavenis owned process doing -bs
Date: Wed, 4 Aug 1999 09:57:06 +0300 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
To: djgpp AT delorie DOT com
Subject: Re: Unlimited size integers
In-Reply-To: <37a6d475.178890@newsb.telia.net>
Message-ID: <Pine.A41.4.05.9908040953390.36232-100000@ieva01.lanet.lv>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com


On Tue, 3 Aug 1999, Johan Winge wrote:

> On Fri, 30 Jul 1999 21:38:06 +0300, pavenis AT lanet DOT lv wrote:
> 
> >On 30 Jul 99, at 13:41, Marcus Rohrmoser wrote:
> >
> >> 
> >> There's a possibility if using C++. See <somplex.h> for an example how
> >> to create your own types beeing useable like builtins.
> >> 
> >> But 'unlimited' still won't be possible, for your computer's memory IS
> >> limited.
> 
> Yes, of course. In fact integers up to 2^10000000 will do nicely.
> (That is approx. 1 MB for each number, and I only need a couple of
> them...)
> 
> >
> >1) Install libg++ binaries
> >
> >2) After that 
> >        #include <Integer.h>
> 
> Ok so far.
> 
> >        and class Integer provides functionality You want (of course    
> >     for C++ only)
> 
> Uhm, this may sound stupid but could you show exactly how? How to
> initialise the integers etc?
> 

If the value You want assign to Integer variable is longer than gcc can
handle then perhaps only way is through character string, like:

	Integer  x = atoI("123448599959896499494958494938993939949",10);

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019