As an extension, GNU C supports decimal floating types as defined in the N1312 draft of ISO/IEC WDTR24732. Support for decimal floating types in GCC will evolve as the draft technical report changes. Calling conventions for any target might also change. Not all targets support decimal floating types.
The decimal floating types are
_Decimal128. They use a radix of ten, unlike the floating types
long double whose radix is not specified by the C standard but is usually two.
Support for decimal floating types includes the arithmetic operators add, subtract, multiply, divide; unary arithmetic operators; relational operators; equality operators; and conversions to and from integer and other floating types. Use a suffix ‘
df’ or ‘
DF’ in a literal constant of type
dd’ or ‘
_Decimal64, and ‘
dl’ or ‘
GCC support of decimal float as specified by the draft technical report is incomplete:
wchar.h, which must come from a separate C library implementation. Because of this the GNU C compiler does not define macro
__STDC_DEC_FP__to indicate that the implementation conforms to the technical report.
_Decimal128 are supported by the DWARF 2 debug information format.
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.