How to use GMP.

Safuat Hamdy hamdy@math.ucalgary.ca
Wed, 7 May 2003 22:37:34 -0600


On Wednesday 07 May 2003 21:08, Hashida wrote:

> In addition, what does "_mp_alloc" mean?
> Is "aaaaa._mp_alloc" 2 because "aaaaa" is used twice in mpz_*** ?
> (set 1 in "mpz_init" and set 2 in "mpz_mul_ui")

Boy, why don't you just use the regular interface?!!  Ordinary users, and=
=20
particularly beginners, are not supposed to fiddle around with the intern=
als=20
of mpz_t objects.

Just say

=09mpz_t=09a, b;

=09...

and you're fine!  No strange results!

Since you yourself said that you are rather new to C _and_ GMP, you reall=
y=20
should _first_ get some experience with just C before exploring the GMP=20
internals.  But even so, some GMP internals are descibed in the manual.


--=20

S. Hamdy                                |  All primes are odd except 2,
Dept. of Mathematics & Statistics       |  which is the oddest of all.
University of Calgary                   |
                                        |
unsolicited commercial e-mail           |
is strictly not welcome                 |