mpaland/printf

%g should omit trailing zeros

ledvinap opened this issue · 1 comments

printf("%g", 0.0001) : 
expected:  "0.0001"
got: "0.000100000" 

printf("%g", 0.00001) : 
expected: "1e-05"
got : "1.000000e-05"

Fixed on my fork by commit 84e66ae; see also #75 .