my first code using GMP!
tg at gmplib.org
Wed May 30 23:45:06 CEST 2012
Pranav Jawale <pranavshriram at gmail.com> writes:
Earlier I tried to use gmp_printf, but it was giving seg fault. I think
gmp_printf ("fixed point mpf %.*Ff with %d digits\n", n, f, n);
is not working properly
If you think that, please write a complete example that we can run, and
report to or bug reporting list. See the GMP manual for bug reporting
(If you took the code pattern very literally, and pasted it as if it
were a complete example, then the uninitialised f and n will surely
yield some surprises.)
Anyway, just using %.*Ff is equivalent to what I had written code for.
Alas, I don't think it is. It hopefully gets the exponent right, while
your code seem to have gotten it wrong.
More information about the gmp-discuss