Returns a string representation of the BigDecimal rounded to the specified
number of digits.
toPrecision(digits, roundingMode)
digits
The number of digits.
roundingMode optional
A string specifying the rounding mode: "floor", "ceiling", "down", "up", "half-even", "half-up". Defaults to "half-up".
A string representing the value. Can be in exponential notation.
123.4567m.toPrecision(1)
"1e+2"
123.4567m.toPrecision(4)
"123.5"
123.4567m.toPrecision(4, "down")
"123.4"