1// PTO-UNIT: {"id":"PTO-ARCH-DATA-TYPES-ROUNDING","surface":"arch","classification":["data-types","rounding"],"depends_on":["PTO-ARCH-DATA-TYPES-FLOATING-POINT"]}2// Semantic rounding modes are independent of every encoded selector3// namespace. Scalar FRM, fixed conversion overrides, bundle RMode, and public4// API controls must resolve into this type explicitly.5type NumericRoundingMode ofenumeration{6 NumericRound_RNE,7 NumericRound_RTM,8 NumericRound_RTP,9 NumericRound_RTZ,10 NumericRound_RNA,11 NumericRound_RTO,12 NumericRound_RHB13};1415type NumericExecutionControl ofrecord{16 rounding_mode: NumericRoundingMode,17 saturating: boolean18};1920// Bit-exact value classes are format properties. They do not select an21// operation result, exception flag, target profile, or arithmetic algorithm.22purefuncDefaultNumericExecutionControl()=> NumericExecutionControl23begin24returnNumericExecutionControl{25 rounding_mode = NumericRound_RNE,26 saturating =FALSE27};28end;2930// Selects only a bounded set of accepted negative applicability rules. This31// is not a complete target-profile selector: absence of a rejection does not32// claim target support or select numeric result semantics.33type NumericApplicabilityRuleSet ofenumeration{34 NumericApplicabilityRules_None,35 NumericApplicabilityRules_A2A3MxRejection36};37
Architecture behavior
purpose scope
Purpose and scope
This unit defines the semantic rounding-mode namespace and the common execution-control record used after encoded selectors have been resolved.
It separates mathematical mode identity from scalar FRM, fixed conversion overrides, bundle RMode, and public API selector encodings.
NumericExecutionControl pairs a NumericRoundingMode with a saturating boolean.
NumericApplicabilityRuleSet names no extra rejection or the bounded A2A3MxRejection rule set.
rules interactions
Rules and interactions
DefaultNumericExecutionControl selects NumericRound_RNE with saturating = FALSE.
Every encoded selector namespace must resolve explicitly into NumericRoundingMode; enum position is not an implicit wire encoding.
The applicability enum is only a bounded negative-rule selector. Lack of rejection does not claim target support or select result semantics.
boundaries
Architectural boundaries
These types do not define how an arithmetic operation rounds a particular value. Exact result algorithms remain with operation/profile owners.
A2A3MxRejection is a named target-facing rule set, not portable PTO behavior that can be applied outside its selecting owner.
example usage
illustrative reading example
A bundle RMode code is first decoded by its owner and only then becomes, for example, NumericRound_RTZ; this page does not equate their numeric encodings.
A consumer that needs the architectural default can call DefaultNumericExecutionControl rather than reproducing RNE and non-saturating defaults locally.