Re: Can printf() be made smarter?
- Posted by MarkB Nov 02, 2018
- 1152 views
Hi Pete, thanks for replying.
Yes, %.8g fares better, but I thought still requires knowledge of the significant digits in the source atom. However after reading your post I compared %.10g (result 12835.81) and %.10f (result 12835.8100000000) so I take back my original comment regarding %g being useless. It actually works and deletes the trailing zeros itself, why didn't I think to try this before?
Seems the lack of smarts wasn't in printf() after all.