Rshift

GabrieleMartino martino.gabriele at fastwebnet.it
Sat Oct 29 13:17:43 CEST 2005


Hi,

i need to rigth shifting a mpz_t variable but i dont understand how
i can do that using the mpn_rshift function.

I tried with...

mp_size_t n;
mpz_t e;
mp_limb_t limb;
mp_limb_t limb_shift;

mpz_init_set_str(e,"123456789",10);
limb=mpz_getlimbn(e,n);
mpn_shift(&limb_shift,&limb,n,3);

And then??
How can i get "limb_shift" in mpz_t notation?

Could someone post me the right code?

Thank you.


Gabriele Martino




More information about the gmp-discuss mailing list