Printing Fixed decimal places using errs () in llvm
How to print fixed point decimal points with errs () on the llvm output stream.
For example, if now if you do errs () <3,3; it manifests itself in scientific notation. I want this in decimal notation. I dont want to print with cout but with errors
+3
coder hacker
source
to share
1 answer
You can use the function format
from include/llvm/Support/Format.h
to create strings similar to C-printf:
errs() << format("%.3f\n", 3.3);
and etc.
+5
Eli bendersky
source
to share