Let's say I have a
mpf_t number;
that equals 1.25. I want to print it with a given precision, even if there would be trailing zero's, for example
1.2500000
When I try to print it by using a mpf_get_str function, it prints in scientific (e) format,
mpf_out_str(stdout,10,7,number); //prints 0.125e1
When I use c++'s cout, as mpf_t has << overloaded,
cout << number << endl; //prints 1.25
and when I try to print it by calling setprecision(given precision) in cout, i still get 1.25
cout << setprecision(7) << number << endl; //prints 1.25
So, how can I print the number as I'd like it?