Convert rational to fixed-point decimal number

Pisminskaya Alexandra Aleksandra.Pisminskaya at
Tue Feb 16 14:10:32 CET 2010

Example, 0.3333333333333. Depend by my precision.

С уважением, Письминская Александра
-----Original Message-----
From: tg at [mailto:tg at] 
Sent: Tuesday, February 16, 2010 4:01 PM
To: Pisminskaya Alexandra
Cc: gmp-discuss at
Subject: Re: Convert rational to fixed-point decimal number

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

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


More information about the gmp-discuss mailing list