delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/12/16:04:52

Newsgroups: comp.os.msdos.djgpp
From: fred smith <fredex AT fcshome DOT stoneham DOT ma DOT us>
Subject: Re: VERY long numbers (and i mean... VERY!!!)
User-Agent: tin/1.4.1-19991201 ("Polish") (UNIX) (Linux/2.0.36 (i586))
Sender: fredex AT fcshome DOT stoneham DOT ma DOT us (fred smith)
Organization: None!
Message-ID: <FptK1z.4t8@fcshome.stoneham.ma.us>
References: <20000211112031 DOT 19889 DOT qmail AT web122 DOT yahoomail DOT com>
Date: Sat, 12 Feb 2000 13:27:35 GMT
Lines: 33
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Mohamed Saad <bazramit AT yahoo DOT com> wrote:
: Good afternoon fellows,
:    How are ya? fine? good! :)

: is there a djgpp unit for representing VERY large
: numbers???
:   I am developing a program that needs to use numbers
: that are very large!!! even long double reaches
: infinity before i can reach the value i need!!

: i need numbers that can contain approximately 10000
: digits (may be more!)!! (Hope it's represented as
: fixed point! but this ain't necessary!)

There are several multiple-precision (and/or arbitrary-precision)
math libraries around. The one that comes to mind at the moment is
GMP from the GNU folks (www.gnu.org). What I don't know is if anyone
has done a DOS version of it, or how hard it would be. But if it can
be made to compile/run on DOS it'll do what you want, i.e., arithmetic
on arbitrarily long numbers.

I seem to recall there is/was some large-precision math stuff in the
snippets collection (www.snippets.org, if I remember rightly) last time
I looked, though I don't know how complete it was. I also seem to 
recall some warnings about possible lack of efficiency.

Fred

-- 
---- Fred Smith -- fredex AT fcshome DOT stoneham DOT ma DOT us ----------------------------
                    The Lord detests the way of the wicked 
                  but he loves those who pursue righteousness.
----------------------------- Proverbs 15:9 (niv) -----------------------------

- Raw text -


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