Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
💻 PD ISO/IEC TS 18661 is a Published Document series issued by BSI adopting the ISO/IEC technical specification TS 18661, providing floating-point extensions for the C language. C floating-point arithmetic is jointly defined by the C standard (ISO/IEC 9899) and the IEEE 754 floating-point standard; this series extends it, supporting higher-precision binary floating-point, decimal floating-point, interchange/extended types and supplementary functions, for high-performance numerical computation, financial decimal arithmetic, embedded and scientific computing. Developed by ISO/IEC JTC 1/SC 22 (Programming languages).
| Document | Subject | Edition | Status |
|---|---|---|---|
| PD ISO/IEC TS 18661-1 | Binary floating-point arithmetic | 2014 | Readable |
| PD ISO/IEC TS 18661-2 | Decimal floating-point arithmetic | 2015 | Readable |
| PD ISO/IEC TS 18661-3 | Interchange and extended types | 2015 | Readable |
| PD ISO/IEC TS 18661-4 | Supplementary functions (scanned) | 2015 | Scanned |
| PD ISO/IEC TS 18661-5 | Interchange formats (scanned) | 2016 | Scanned |
Part 1 introduces binary floating-point arithmetic extensions to C. The C standard (e.g., C11) already supports IEEE 754-based float/double/long double; this part extends the _FloatN type family, including _Float16, _Float32, _Float64, _Float128, etc., and specifies their representation, arithmetic, rounding and conversion rules. Its content covers:
_FloatN types (per IEEE 754).fmax/fmin, fma fused multiply-add.This part lets C conveniently use higher-precision binary floating-point while maintaining IEEE 754-consistent portable behaviour.
_Float128 can markedly reduce rounding-error accumulation, and this part provides standardised type and function support for such applications.Part 2 introduces decimal floating-point arithmetic to C. Unlike binary floating-point, decimal floating-point can exactly represent decimal fractions (e.g., 0.1, 0.01), avoiding the rounding error from binary’s inability to exactly represent most decimal fractions — essential for financial, accounting and monetary calculations. Its content includes:
_Decimal32, _Decimal64, _Decimal128.Part 3 specifies interchange formats and extended types. Interchange formats are floating-point representations with fixed byte order and width for data exchange, ensuring interchangeability of floating-point data across platforms/compilers; extended types are higher precision/range extensions beyond basic types. Content covers definition of interchange formats, storage layout, alignment and type conversion, providing standardised floating-point encoding for cross-platform data transfer and storage (files, networks, databases).
Part 4 specifies supplementary functions, such as floating-point extended versions of logarithms, exponentials, trigonometric and inverse functions, and special functions (e.g., gamma, error functions), providing standardised interfaces for scientific computing. Part 5 further details the specific bit layout, encoding and decoding rules of interchange formats, supplementing Part 3 to ensure determinism of cross-platform floating-point data exchange.
_Float128 to reduce rounding error._DecimalN for exact decimal-fraction arithmetic._FloatN), and enable relevant feature macros when needed._Float128 used for?_FloatN and decimal floating-point extensions; the exact support level must be checked in compiler documentation, enabling feature macros when needed.