1// PTO-UNIT: {"id":"PTO-ARCH-DATA-TYPES-NUMERIC-CLASSIFICATION","surface":"arch","classification":["data-types","numeric-classification"],"depends_on":["PTO-ARCH-DATA-TYPES-ROUNDING"]}2type NumericValueClass ofenumeration{3 NumericValue_InvalidEncoding,4 NumericValue_PositiveZero,5 NumericValue_NegativeZero,6 NumericValue_PositiveSubnormal,7 NumericValue_NegativeSubnormal,8 NumericValue_PositiveNormal,9 NumericValue_NegativeNormal,10 NumericValue_PositiveInfinity,11 NumericValue_NegativeInfinity,12 NumericValue_QuietNaN,13 NumericValue_SignalingNaN14};1516// Input and result subnormal rules are intentionally separate. They describe17// the named hardware numeric profile and are not pto-v0 arithmetic behavior.18type NumericInputSubnormalRule ofenumeration{19 NumericInputSubnormal_NotApplicable,20 NumericInputSubnormal_Preserve21};2223type NumericResultSubnormalRule ofenumeration{24 NumericResultSubnormal_NotApplicable,25 NumericResultSubnormal_GradualUnderflow26};2728type NumericTininessDetectionRule ofenumeration{29 NumericTininessDetection_NotApplicable,30 NumericTininessDetection_AfterRounding31};3233type TileNumericSelection ofrecord{34 use_operation_default: boolean,35 rounding_mode: NumericRoundingMode,36 saturating: boolean37};3839// PTO-REQ-PROFILE-001, PTO-REQ-HARDWARE-NUMERIC-001:40// bit-exact value classification for every TileDataType.4142purefuncNumericValueClassIsNaN(value_class: NumericValueClass)=> boolean43begin44return value_class == NumericValue_QuietNaN ||45 value_class == NumericValue_SignalingNaN;46end;4748purefuncNumericValueClassIsInfinity(value_class: NumericValueClass)=> boolean49begin50return value_class == NumericValue_PositiveInfinity ||51 value_class == NumericValue_NegativeInfinity;52end;5354purefuncNumericValueClassIsZero(value_class: NumericValueClass)=> boolean55begin56return value_class == NumericValue_PositiveZero ||57 value_class == NumericValue_NegativeZero;58end;5960purefuncNumericValueClassIsSubnormal(value_class: NumericValueClass)=> boolean61begin62return value_class == NumericValue_PositiveSubnormal ||63 value_class == NumericValue_NegativeSubnormal;64end;65
Architecture behavior
purpose scope
Purpose and scope
This unit defines the common value classes and numeric-policy records used across every tile numeric format.
A shared classification vocabulary lets format owners report exact bit-pattern categories without selecting an arithmetic result or target implementation.
concepts state
Concepts and visible state
NumericValueClass includes invalid encoding; signed zero, subnormal, normal, and infinity; plus quiet and signaling NaN.
Input and result subnormal policies are separate: NumericInputSubnormalRule and NumericResultSubnormalRule do not collapse into one switch.
TileNumericSelection carries whether an operation default is used, the selected NumericRoundingMode, and a saturating flag.
rules interactions
Rules and interactions
NumericValueClassIsNaN, NumericValueClassIsInfinity, NumericValueClassIsZero, and NumericValueClassIsSubnormal test only their named class pairs.
NumericTininessDetectionRule distinguishes not-applicable from after-rounding detection.
Classification is a format property. It does not itself choose exception flags, rounding, saturation, or an operation result.
boundaries
Architectural boundaries
The input/result subnormal enums describe the named hardware numeric profile, not general pto-v0 arithmetic behavior.
A value class does not prove that an operation supports the corresponding data type; support remains with the active operation and profile owner.
example usage
illustrative reading example
NumericValue_NegativeZero makes NumericValueClassIsZero true, but it does not make NumericValueClassIsSubnormal true.
A consumer may branch on NaN classification before ordinary comparison, then return to its own profile owner for the exact selected result.