mini-gmp

Zimmermann Paul Paul.Zimmermann at inria.fr
Mon Feb 3 06:27:59 UTC 2014


       Marco,

> >> We could add _mpz_realloc (and add mpz_realloc2, which is the
> >> recommended gmp interface).
> 
> >>   #if WITH_MINI_GMP
> >>   #define _mpz_realloc(x, s)
> >>   #define mpz_realloc2(x, s)
> >>   #endif
> 
> > does not work, since for example in mpfr_get_z_2exp (mpz_ptr z,
> > mpfr_srcptr f), we need to make sure that z has sufficient space
> > to store the significand of f.
> 
> Maybe you do not really need mpz_realloc2, but mpz_limbs_write, right?
> I think I'll add the mpz_limbs_* interface to mini-gmp, instead of
> mpz_realloc2. Will this fit your needs?

yes I believe it will.

Paul


More information about the gmp-bugs mailing list