Printing out mpf_class inside gdb

Kevin Ryde user42 at zip.com.au
Mon Jul 19 00:44:51 CEST 2004


Stephen torri <storri at torri.org> writes:
>
> Simply add a delimeter to the end, \0 , to every
> mpf_class type when written to a file.

Yes, but you have to do that yourself.  GMP c++ output follows the c++
output conventions, and the input follows the c++ float parsing
conventions.  You need some sort of separator in the output to
disambiguate when reading back.

A NUL character is probably not a good idea if it's going to be a text
file, a space or newline may be better.  Input will skip leading
whitespace if the ios::skipws flag is set (I'm not sure if that's the
default).

-- 
All followups to gmp-bugs at swox.com please.


More information about the gmp-bugs mailing list