BigFloat.prototype.toPrecision

Returns a string representation of the BigFloat in exponential notation rounded to the specifie number of digits.

Syntax

toPrecision(digits, roundingMode?, radix?)

Parameters

Return value

A string representing the value in exponential notation.

Examples

123.4567l.toExponential(1)
"1e+2"
123.4567l.toExponential(4)
"1.2346e+2"
123.4567l.toExponential(4, BigFloatEnv.RNDD, 16)
"7.b74ep+4