Added option to limit the number of digits before the decimal point