ivy: delete trailing zeros and decimal in %g format

Floating-point style printing now done.