The format is usually: %[flags][width][.precision][length]specifier , for example, %.20f
If you pass .* .20 than .20 , you can pass arbitrary precision at run time to a decimal value.
NOTE: you can use g too, however you should notice that in some cases there will be a difference in the result (between f and g - because of how the accuracy is interpreted.)
The main question, although why do you need such accuracy? (double / float are inaccurate) ...
source share