How To calculate/display large float numbers?
bodrato at mail.dm.unipi.it
Tue Nov 29 04:54:08 UTC 2016
Il Dom, 27 Novembre 2016 3:55 pm, Torbjörn Granlund ha scritto:
> Marc Glisse <marc.glisse at inria.fr> writes:
> On Sun, 27 Nov 2016, Torbjörn Granlund wrote:
> > (Allowing floating-point input strings would be a conceivable
> > here, since any finite string corresponds to a rational number.)
> Perhaps this works:
> 3. Compute g = gcd(a',b') and let the result be a/b where a = a'/g and
> b = b'/g.
I'd delegate the canonicalization to mpq_canonicalize :-)
More information about the gmp-discuss