Change many %g format specifiers to %.*g with precision DBL_DIG + 1.