Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #4693

Re: large integer

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!border2.nntp.ams2.giganews.com!backlog4.nntp.ams3.giganews.com!backlog4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail
NNTP-Posting-Date Tue, 12 Aug 2014 06:22:29 -0500
From "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org>
Newsgroups comp.programming
References <9e5d6662-d967-4ff0-9089-33004e916323@googlegroups.com> <53e97060$0$11021$703f8584@textnews.kpn.nl>
Subject Re: large integer
Date Tue, 12 Aug 2014 12:23:35 +0100
X-Priority 3
X-MSMail-Priority Normal
X-Newsreader Microsoft Outlook Express 6.00.2900.5512
X-RFC2646 Format=Flowed; Response
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.5512
Message-ID <s_SdnTTNT9BoZXTOnZ2dnUVZ7ocAAAAA@bt.com> (permalink)
Lines 21
X-Usenet-Provider http://www.giganews.com
X-AuthenticatedUsername NoAuthUser
X-Trace sv3-U7ea+6Vi4lWoP7m/sg8xMOkW7kVzIhyVENtLy5FJ1DQBQqYCM8xKkcbpkOxUXqoFVm8y7D7seq7+JGx!/dANf2B8udwp0OFjl+puj24eVQkR4OHEC2nQWtY/teYeHvk47+wl5pHi4UsHFCwk4qvZy+Wz8Q==
X-Complaints-To abuse@btinternet.com
X-DMCA-Complaints-To abuse@btinternet.com
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 1962
Xref csiph.com comp.programming:4693

Show key headers only | View raw


Sjouke Burry wrote:

> > What is the best way to store a large integer?
> >
> > Let's say it can be of theoretically unlimited size (assuming adequate
> > memory).
> In a large enough block of memory. Where else?

Linked list ?   /Very/ fast right and left shifts.

Also suitable if the underlying language implementation handles linked list 
better than large blocks of memory -- I think that some Lisp systems have used 
that representation (can't remember for sure, though).

Also /necessary/ if you want to handle numbers larger than will fit into main 
memory, and so the "digits" (or groups of 'em) are mapped out to file (there is 
at least one bignum package that does this).

    -- chris 

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

large integer b <mike7411@gmail.com> - 2014-08-11 16:55 -0700
  Re: large integer Kaz Kylheku <kaz@kylheku.com> - 2014-08-12 00:47 +0000
    Re: large integer "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2014-08-12 12:17 +0100
      Re: large integer Richard Heathfield <invalid@see.sig.invalid> - 2014-08-14 12:29 +0100
        Re: large integer "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2014-08-15 09:31 +0100
  Re: large integer Sjouke Burry <burrynulnulfour@ppllaanneett.nnll> - 2014-08-12 03:39 +0200
    Re: large integer "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2014-08-12 12:23 +0100
  Re: large integer Mark Storkamp <mstorkamp@yahoo.com> - 2014-08-12 09:36 -0500

csiph-web