setNumDecimals(n) sets the number of digits following the decimal point in all numerical output to n.