help about gmf_t

David Gillies daggillies at gmail.com
Wed Jun 19 15:58:36 CEST 2013


In case (peng) the above is not clear, I compiled and ran the code you
provided. It gives you the answer right there:

A=3.140000000000000124344978758018
B=5.780000000000000248689957516035
C=0.543252595155709340699569887244

3.140000000000000124344978758018 != 3.14

          mpf_init_set_str(a,"3.14",10);
          mpf_init_set_str(b,"5.78",10);
          mpf_init(c);
          mpf_div(c,a,b);

C=0.543252595155709342560553633218



On Tue, Jun 18, 2013 at 3:33 AM, Zimmermann Paul
<Paul.Zimmermann at inria.fr>wrote:

> please use mpf_set_str and not mpf_set_d:
> http://www.mpfr.org/faq.html#accuracy
>
> Paul Zimmermann
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-discuss
>



-- 
David Gillies
San Jose
Costa Rica


More information about the gmp-discuss mailing list