Library / Numbers / Numeric contracts / RoundingMode
ENUM
RoundingMode
RoundingMode — how a decimal128 operation breaks at the boundary where
it must drop digits. The bare operators + - * / always round to 34
significant digits with HALF_EVEN; the explicit-context methods
(roundTo, and add/subtract/multiply/divide with an explicit
precision) take a mode. There is NO ambient/global rounding context —
every mode-taking call names its choice (the readable north-star).
The set is Java's RoundingMode minus UNNECESSARY; a superset of
IEEE 754's five rounding-direction attributes. HALF_EVEN is the
zero-default (it is listed first), matching the bare-operator behavior.
Backs the Decimal128 value-class (Decimal128.ev, V1 Part #40).
Cases 7
| Case | Description |
|---|---|
HALF_EVEN | — |
HALF_UP | — |
HALF_DOWN | — |
UP | — |
DOWN | — |
CEILING | — |
FLOOR | — |