Re: Raising a Number doubt..?
- From: jacob navia <jacob@xxxxxxxxxx>
- Date: Mon, 29 Dec 2008 23:24:02 +0100
user923005 wrote:
On Dec 25, 2:33 am, Barry Schwarz <schwa...@xxxxxxxx> wrote:On Thu, 25 Dec 2008 00:11:14 -0800 (PST), cnoe <azeez...@xxxxxxxxx>
wrote:
Hi,What level of precision to you require? The exact value in decimal
With a C compiler,
I've to do xtremely large calculations.
The largest calculation I've to dealt with it is,
Raising a highest 10 digit decimal number [ 9,999,999,999 ]
to a highest 10 digit decimal number [ 9,999,999,999 ]
has roughly 1E11 (100,000,000,000) digits. Storing this value in
binary will require about 125 MB of memory (for 8-bit bytes).
Something seems strange about your storage calculation.
In BCD, it would require 50 GB, which wastes less than two bits per
byte.
125MB = 1024*1024*125 = 131072000
Multiplying by 8 we get the number of bits:
1048576000
The number of decimal digits that can be stored in 1048576000 bits is
1048576000*log(2)/log(10) --> 315652828.7333
In a 125MB space you can store 315 652 828 decimal digits only. A far
cry from the 1e11 needed...
If I didn't make a mistake somewhere... My maths are rusty
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
.
- References:
- Raising a Number doubt..?
- From: cnoe
- Re: Raising a Number doubt..?
- From: Barry Schwarz
- Re: Raising a Number doubt..?
- From: user923005
- Raising a Number doubt..?
- Prev by Date: Re: Error handling in C
- Next by Date: Re: fflush(stdin), scanf and a space
- Previous by thread: Re: Raising a Number doubt..?
- Next by thread: Re: Raising a Number doubt..?
- Index(es):
Relevant Pages
|