Skip to content

decimalToExponential

decimalToExponential(value, fractionDigits?, roundingMode?): string

Defined in: packages/math-numbers/src/decimal/decimal-to-exponential.ts:22

Exponential notation — one digit before the point, fractionDigits after, and an e± exponent. Number.prototype.toExponential for a decimal that is not limited to binary64, and so with no cap on the digit count.

Omitting fractionDigits shows as many as the value actually has, matching the language.

Readonly<Decimal>

The decimal to render.

number

Places after the point. Defaults to the value’s own.

RoundingMode = DEFAULT_ROUNDING_MODE

How to break the last digit. Defaults to half-even.

string

The numeral.

If fractionDigits is not a non-negative integer.