Overview
ISO/IEC TS 18661-5:2016 - “Information Technology - Floating-point extensions for C - Part 5: Supplementary attributes” - extends the C programming language to support floating-point attributes recommended in ISO/IEC/IEEE 60559:2011 (the updated IEEE 754). The technical specification defines how C implementations expose constant (translation-time) floating‑point semantics via standard pragmas and implementation macros so that programs can declare attributes such as exception handling, evaluation formats, optimization controls and reproducibility guarantees.
Key topics and requirements
- Language binding for IEEE 60559 attributes: Provides C-level support for attributes that are recommended by ISO/IEC/IEEE 60559:2011, implemented primarily via standard pragmas.
- Standard pragmas: Specifies pragmas to fix floating-point semantics for code blocks at translation time (not runtime). These extend the existing set of C floating-point pragmas.
- Evaluation formats: Defines attributes for selecting evaluation formats (e.g., preferredWidth) used when computing intermediate floating-point results.
- Optimization controls: Specifies attributes to allow or disallow value-changing optimizations that may alter floating-point results (e.g., transformations that change rounding or evaluation order).
- Reproducibility: Introduces attributes to support producing exactly reproducible floating-point results and exception behavior across conforming implementations.
- Alternate exception handling: Optional specification for alternate methods of handling floating-point exceptions; implementations that support this must define a specific conformance macro.
- Conformance macros: Implementations conforming to this part must meet C11 with TS 18661 parts 1–5 changes, conform to 18661-1 or 18661-2 (binary or decimal), and define STDC_IEC_60559_ATTRIBS to 201607L. Optional alternate exception handling support requires STDC_IEC_60559_ATTRIB_ALTERNATE_EXCEPTION_HANDLING.
Applications and who uses it
ISO/IEC TS 18661-5 is targeted at:
- Compiler and toolchain vendors - to implement pragma-based floating-point attributes and provide precise conformance macros.
- Numerical library authors and HPC developers - who need controlled evaluation formats, deterministic rounding, and reproducible results across platforms.
- Safety‑critical and embedded systems - where predictable exception handling and fixed floating-point semantics are required for certification and auditability.
- Financial and decimal-arithmetic applications - when combined with TS 18661-2 for decimal floating-point support.
- Standards bodies and language designers - as a reference for C language bindings to IEEE 754/IEC 60559 features.
Related standards
- ISO/IEC 9899:2011 (C11) - base C standard extended by TS 18661 series.
- ISO/IEC TS 18661-1..4 - companion parts covering binary/decimal formats, interchange and extended types, and supplementary functions.
- ISO/IEC/IEEE 60559:2011 (IEEE 754-2008) - floating-point arithmetic standard that defines the attributes this TS implements.
- ISO/IEC TR 24732 - earlier decimal floating-point work referenced in the TS series.
Keywords: ISO/IEC TS 18661-5, floating-point extensions for C, supplementary attributes, IEEE 754, IEC 60559, C language floating-point, pragmas, reproducibility, exception handling, evaluation formats.