GMP, C++ formatted output

Nameless Apprentice cucuforcoffee at
Sun Jul 16 21:37:24 CEST 2006


I plan to use the GMP library and am in need of representing the values as
strings for use with MPI.

I require a string representation of an mpf_class that has the same number
of characters, always. That is, the trailing zeros can not be dropped even
though they are not part of the actual accuracy.

For instance, 3 characters for the exponents in base 10, and always the same
number of characters for expressing the mantissa and one for sign. Do any of
you know how to accomplish this or if there is already a function or utility
for doing so?

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the gmp-discuss mailing list