Convert rational to fixed-point decimal number

Torbjorn Granlund tg at gmplib.org
Tue Feb 16 14:01:02 CET 2010


"Pisminskaya Alexandra" <Aleksandra.Pisminskaya at bercut.com> 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)?
  
I am not sure what function you need.

Assume you have 1/3.  What fixed-point decimal number do you want
returned?

-- 
Torbjörn


More information about the gmp-discuss mailing list