The %g specifier doesn\'t seem to behave in the way that most sources document it as behaving.
%g
According to most sources I\'ve found, across multiple la
My favorite format for doubles is "%.15g". It seems to do the right thing in every case. I'm pretty sure 15 is the maximum reliable decimal precision in a double as well.