numericConfig
constnumericConfig:object
Defined in: packages/math-numbers/src/globals.ts:23
Global configuration for the numbers module.
Provides defaults that all numeric types fall back to when no per-operation option is supplied. Users may mutate these fields freely at runtime.
import { numericConfig } from "./numbers/_config.js";
// Use saturation arithmetic globallynumericConfig.defaultOverflowMode = "saturate";
// Use single-precision decimal context globallynumericConfig.defaultDecimalContext = MATH_CONTEXT_DECIMAL32;Type Declaration
Section titled “Type Declaration”defaultDecimalContext
Section titled “defaultDecimalContext”defaultDecimalContext:
DecimalContext
Default precision and rounding context for Decimal operations whose
result may not be finitely representable (division, square roots,
transcendental functions).
Default: MATH_CONTEXT_DECIMAL128 — 34 significant digits, halfEven.
defaultOverflowMode
Section titled “defaultOverflowMode”defaultOverflowMode:
OverflowMode
Default overflow mode for all fixed-precision integer types.
Individual arithmetic operations may override this via an explicit mode?: OverflowMode parameter.
Default: 'wrap' — matches C int8_t / Java byte / WebAssembly i32/i64.