I added set type double at the beginning of my code to implement the double-precision for all newly created variables. This works fine.
However, I also want to display values of my newly created variables with two-decimal digits (e.g. 0.34, 12.01, 9.30). I naively thought that enabling double-precision throughout and then running format new_variable %12.2fc would do the trick. Clearly it doesn't as the format command cause precision issues.
How can I then display newly created variables with two-decimal digits while minimizing any lose in precision?
Thank you.
0 Response to Best practice when using 'format' while maintaining precision of double
Post a Comment