Format for the appropriate number of decimal places