Added the option to limit the number of digits and decimal places