delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/10/23/11:31:14

From: Nate Eldredge <neldredge AT hmc DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Large numbers
Date: 23 Oct 2000 08:07:36 -0700
Organization: InterWorld Communications
Lines: 24
Sender: nate AT mercury DOT st DOT hmc DOT edu
Message-ID: <834s2338av.fsf@mercury.st.hmc.edu>
References: <5 DOT 0 DOT 0 DOT 25 DOT 1 DOT 20001023105643 DOT 009dceb0 AT mail DOT namezero DOT com> <5 DOT 0 DOT 0 DOT 25 DOT 1 DOT 20001023142554 DOT 009d94b0 AT mail DOT namezero DOT com>
NNTP-Posting-Host: mercury.st.hmc.edu
Mime-Version: 1.0
X-Trace: nntp1.interworld.net 972313656 53540 134.173.57.219 (23 Oct 2000 15:07:36 GMT)
X-Complaints-To: usenet AT news DOT interworld DOT net
NNTP-Posting-Date: Mon, 23 Oct 2000 15:07:36 +0000 (UTC)
User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Mithrandi <mithrandi AT mithrandi DOT net> writes:

> At 12:06 10/23/00 +0200, you wrote:
> > > Is it possible to work with numbers that are larger than the size of an
> > > unsigned long long int in DJGPP? (For example, 99999999999971737666) If so,
> > > please explain how.
> >
> >You make arrays in which each element is a "classical" integer that you
> >treat like a digit (e.g. [0..(2**31)-1]  instead of [0..9])
> >You find 5 programmed models and plenty of links on that page
> 
> Well I found an easy(er) way of doing it that solved my problems perfectly. 
> The Integer class... supports really really really big numbers, and is in 
> libgpp.

You can also use libgmp, which is better supported and probably
faster.

ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/gmp31b.zip

-- 

Nate Eldredge
neldredge AT hmc DOT edu

- Raw text -


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