Exponents With C++ Wrapper

Henry henryxxll at gmail.com
Wed May 13 02:29:38 CEST 2009


Hello,
First of all, this is an introduction e-mail, as I'm new to the GMP
community.

So, on to my question.

What I want to do is raise a small integer (single-digit) and raise it to a
larger number (two or three digits). Neither of these are particularly
large, but the answer certainly can be.

The mpz_(ui)_pow(m)_ui function (described
here<http://gmplib.org/manual/Integer-Exponentiation.html#Integer-Exponentiation>)
can be used for integer exponentiation in C. However, this doesn't work with
mpz_class variables; just the mpz_t variables, which I can't figure out how
to use in C++. I don't want to raise numbers to mpz_class-size integers, but
I do want to recieve answers in that range. Is there a workaround, or just
something I'm missing?

Thanks,
Henry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gmplib.org/list-archives/gmp-discuss/attachments/20090512/1de168b3/attachment.html>


More information about the gmp-discuss mailing list