effect-io-ai

Package: effect
Module: BigDecimal

BigDecimal.fromNumber

Creates a BigDecimal from a number value.

It is not recommended to convert a floating point number to a decimal directly, as the floating point representation may be unexpected.

Throws a RangeError if the number is not finite (NaN, +Infinity or -Infinity).

Signature

declare const fromNumber: (n: number) => BigDecimal

Source

Since v2.0.0