mpn_sizeinbase

bodrato at mail.dm.unipi.it bodrato at mail.dm.unipi.it
Thu Jun 14 22:21:38 CEST 2012


Ciao,

Il Gio, 14 Giugno 2012 9:57 pm, Niels Möller ha scritto:
> bodrato at mail.dm.unipi.it writes:
>> 1) mpz/generic/sizeinbase.c is unused.
> s/mpz/mpn/, right?

Right!

> Also the documentation for mpn_get_str ought to be revised, and the
> revised version ought to refer to mpn_sizeinbase as the recommended
> method for figuring out the space needed.

About documentation... shall we explicitly document a supported way to
obtain an mpn form an mpz, and viceversa? The following should always
work, right?

/* {np, nn} <- |z| */
mpz_export (np, &nn, -1, sizeof(mp_limb_t), 0, sizeof(mp_limb_t) * 8 -
mp_bits_per_limb, z);

Regards,
m

-- 
http://bodrato.it/toom-cook/



More information about the gmp-devel mailing list