fix for %g and %G specifier in sprintf

default precision for %g and %G seems to be badly specified