my first code using GMP!

bodrato at bodrato at
Thu May 31 08:53:47 CEST 2012

Ciao Pranav,

Il Mer, 30 Maggio 2012 8:53 pm, Pranav Jawale ha scritto:
> Earlier I tried to use gmp_printf, but it was giving seg fault.

Maybe your code was not ready yet :-)

> I think this line
> gmp_printf ("fixed point mpf %.*Ff with %d digits\n", n, f, n);
> is not working properly

I tried to insert the two lines below in your code, they work smoothly.

  gmp_printf ("\n%%.*FE, with %d digits, gives: %.*FE\n", totalDigits,
totalDigits, ans);
  gmp_printf ("\nfixed point mpf %.*Ff with %d digits\n", totalDigits,
ans, totalDigits);



More information about the gmp-discuss mailing list