Re: Raising a Number doubt..?



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,
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 ]
What level of precision to you require? The exact value in decimal
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
.



Relevant Pages

  • Re: Conformance
    ... They give a precision of approx 30 decimal digits ... is called AT COMPILE TIME when the compiler finds an unknown number ... jacob at jacob point remcomp point fr ...
    (comp.std.c)
  • Calculating log gamma
    ... of Bernoulli numbers, and I can't get any better precision ... than 128-129 decimal digits. ... incresed precision to 132 bits, but I can't get to that precision ... jacob at jacob point remcomp point fr ...
    (sci.math.num-analysis)
  • Re: OT - Re: LDBL_MAX -1.#QNAN0e+000 with MinGW?
    ... precision 80 bit floating-point type. ... lcc-win sets this bit to full precision, ... and all calculations ... jacob at jacob point remcomp point fr ...
    (comp.lang.c)
  • Re: OT - Re: LDBL_MAX -1.#QNAN0e+000 with MinGW?
    ... precision 80 bit floating-point type. ... lcc-win sets this bit to full precision, ... and all calculations ... jacob at jacob point remcomp point fr ...
    (comp.lang.c)
  • naive questions about nested intervals with Farey fractions
    ... in a table as the numerator and denominator of a rational number, ... possible to calculate the rational numbers to double precision, ... the values up and store them in single precision cells, then execute ... requires no calculations beyond the booleans within the SELECT ...
    (comp.databases.theory)