Convert rational to fixed-point decimal number

Torbjorn Granlund tg at gmplib.org
Tue Feb 16 14:32:21 CET 2010


"Pisminskaya Alexandra" <Aleksandra.Pisminskaya at bercut.com> writes:

  Example, 0.3333333333333. Depend by my precision.
  
That looks like "precision loss" to me.

I still am not sure what you want to do, or what the target data type
is.

Perhaps you could multiply the dividend by a suitable power of 10, then
perform the division, then print the quotient?  (How to do that will
require some reading of the fine manual.)

-- 
Torbjörn


More information about the gmp-discuss mailing list