Returns a string representing the value of value
in normal notation to a fixed number of dp
decimal places.
If the value of value
in normal notation has more digits to the right of the decimal point than is specified by dp
, the return value will be rounded to dp
decimal places using rounding mode Big.RM
.
If the value of value
in normal notation has fewer fraction digits then is specified by dp
, the return value will be appended with zeros accordingly.
Unlike Number.prototype.toFixed
, which returns exponential notation if a number is greater or equal to 1021
, this method will always return normal notation.
Throws if value
or dp
is invalid.