Added the function of specifying the length of digits after the decimal point.