Million digits of Pi

Vincent Lefevre vincent at vinc17.net
Sun Nov 10 00:54:40 UTC 2019


On 2019-11-09 12:36:59 +0100, Torbjorn Granlund wrote:
> paul zimmermann <Paul.Zimmermann at inria.fr> writes:
> 
>   However you will soon hit GMP limitations, which cannot compute with huge
>   numbers.
> 
> We're getting old and grumpy, aren't we?  :-D
> 
> GMP can compute with "huge" numbers.  If using mpn, the only limit is
> your RAM.  On 64-bit machines when using mpz, mpf or mpq the limit is
> about 40 billion decimal digits.
> 
> I don't know about mpfr's limits, but as it was designed much later than
> mpf, it might have a better design wrt operand sizes.

On 64-bit machines, MPFR will reach GMP's limit first. MPFR uses
64-bit types on such machines, while GMP uses a 32-bit type for
some size. Now, not all MPFR functions use mpz, so that for basic
functions, the practical limit will be the memory of the machine.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the gmp-discuss mailing list