Ciao,

Il Sab, 8 Febbraio 2014 9:50 am, Niels ha scritto:
> bodr...@mail.dm.unipi.it writes:
>> So, maybe we can discuss about adding a new function to the _limbs
>> interface:
>>
>> mp_ptr
>> mpz_init_limbs_write (mpz_t x, mp_size_t n)

> What is this intended for? Looks a bit like like mpz_init2.

mpz_limbs_write ignore the previous value of the mpz, so it makes sense to
use it just after init.
Of course you are right, it is possible to obtain the same with:

mpz_init2 (x, nn*GMP_NUMB_BITS);
np = mpz_limbs_write (x, nn);

...

Regards,
m

-- 
http://bodrato.it/

_______________________________________________
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel

Reply via email to