Question about printf

Rajmund Csombordi rajmund.csombordi at gmail.com
Sat Sep 29 03:33:04 CEST 2012


Hello there! I hope this mailing list is not dead :D

I checked the manual, but couldn't figure out how exactly gmp_printf works.

mpq_t a;
mpq_init (a);
mpq_set_str (a, "3.14", 0);
gmp_printf ("%Qf\n", n);

I tried with %Q, %F, and a lot other ways but neither worked. I usually got
0.00000 as a result.
So how do you output floating point numbers?


More information about the gmp-discuss mailing list