Vincent Lefevre vincent at
Fri Mar 21 14:02:52 CET 2008

On 2008-03-21 20:58:58 +0900, June Co. wrote:
> I wish that such "packing" functions are officially supported in GMP  
> and MPFR.

What should the specification be? What about endianness?

> 2. use memcpy to pack like "pack_mpf" function in my BNCpack ->  
> .

I don't understand pack_mpz, for instance. If buf is provided by the
caller (i.e. is non-zero), how can he guess the buffer size? If not,
the buffer is allocated by the function, but how does the caller know
its address after the call (since pack_mpz doesn't return any value)?

Vincent Lefèvre <vincent at> - Web: <>
100% accessible validated (X)HTML - Blog: <>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)

More information about the gmp-discuss mailing list