Is there a pow-function for mpz_t and double

Marc Glisse marc.glisse at inria.fr
Sat Apr 3 10:53:18 CEST 2010


On Fri, 2 Apr 2010, Martin Schmidt wrote:

> I have a large integer (mpz_t or mpz_class) x and a floating point (C++
> double) value y and want to compute x to the power of y (x^y).

You probably want to look at mpfr. What kind of result are you expecting? 
An integer ? Is your double really an integer (or maybe 1/2) ?

-- 
Marc Glisse


More information about the gmp-discuss mailing list