How To calculate/display large float numbers?

Marco Bodrato bodrato at mail.dm.unipi.it
Tue Nov 29 04:54:08 UTC 2016


Ciao,

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
> extension
>   > 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 :-)

Best regards,
m

-- 
http://bodrato.it/papers/



More information about the gmp-discuss mailing list