Skip to content

DecimalContext

DecimalContext = object

Defined in: packages/math-numbers/src/decimal/decimal-types.ts:57

Precision and rounding settings for operations whose exact result may have no finite decimal expansion, such as the division of repeating decimals or the square root of a non-square integer.

A precision of 0 means unlimited: the operation either terminates exactly or throws.

precision: number

Defined in: packages/math-numbers/src/decimal/decimal-types.ts:59

Number of significant decimal digits retained; 0 means unlimited.


roundingMode: RoundingMode

Defined in: packages/math-numbers/src/decimal/decimal-types.ts:65

Rounding mode applied when the result is not exactly representable. The default is half-even, the IEEE 754 default.