effect-io-ai

Package: effect
Module: BigDecimal

BigDecimal.toExponential

Formats a given BigDecimal as a string in scientific notation.

Example

import * as assert from "node:assert"
import { toExponential, make } from "effect/BigDecimal"

assert.deepStrictEqual(toExponential(make(123456n, -5)), "1.23456e+10")

Signature

declare const toExponential: (n: BigDecimal) => string

Source

Since v3.11.0