I'm using the following code to print float number (value
is of type float
):
std::ostringstream ss;
ss << std::fixed << std::setprecision(9) << value;
which works fine most the cases. However, when value
is very small I'm getting things like:
2.98e-07
while I'd would expect the following (fixed notation with 9 decimal numbers):
0.0000000289
Thus, what is the way of using std::ostringstream to achive this, please?