Print units and quantities with %g format