Size of mpz
paul zimmermann
Paul.Zimmermann at inria.fr
Fri Nov 27 07:38:59 UTC 2015
David,
> Hey!
>
> I have a question regarding the base of a randomised mpz-number.
> I used the speed.c file to compare the run-times of multiplication
> algorithms and there you can set the size of these numbers with the
> parameter s.
> My question is: If s is for example 10. How big are the numbers in
> decimalsystem which are multiplied.
> My assumption is: the base is 2, on a 64-bit CPU my number has now 10 * 64
> = 640 digits. So the number is between 2^640-1 and 2^639. Is that correct?
>
> Greetings,
> David
the size -s of speed is the number of limbs, thus indeed on a 64-bit computer
-s 10 will use 10 limbs, thus ten 64-bit words, i.e., a number between
2^580 and 2^640-1 (maybe some functions like division require a full 640-bit
number, with the bounds you give above).
Paul
More information about the gmp-discuss
mailing list