Convert rational to fixed-point decimal number

James Cloos cloos at
Sun Feb 28 01:10:38 CET 2010

>>>>> "Torbjorn" == Torbjorn Granlund <tg at> writes:

> I try to use mpq_ functions in my program. How can I convert mpq_t
> type to fixed-point decimal number without loss precision (without
> using double IEEE)?
Torbjorn> I am not sure what function you need.

It sounds like what he wants gmp_printf(3).

James Cloos <cloos at>         OpenPGP: 1024D/ED7DAEA6

More information about the gmp-discuss mailing list