You have to use %g instead of %f. The difference between these is that %f never uses "e", %e always uses it, %g decides from the magnitude of numbers. So, printf "%.3g\n",1.567E-09; works. You need ".3g" instead of ".2" because there are 3 digits together with the one before the point.