I am trying to use setprecision to output at most 5 digits after the decimal point of a floating point number. The problem is that it prints out more than 5 digits if there are zeros. For example, if I have a number
I would like to print out
But instead it prints out 0.045678
So it doesnt count the 0 as a digit.
Can somebody tell me how to do this?