Open
Description
Newer versions of C allow the following relevant interchange types:
_Float16
: 16-bit IEEE floating point numbers_Float32
: 32-bit IEEE floating point numbers_Float64
: 64-bit IEEE floating point numbers_Float64x
: Extended 64-bit IEEE floating point numbers (e.g. x86 f80long double
)_Float128
: 128-bit IEEE floating point numbers_FloatN _Complex
- Suffix
F16
/f16
- Suffix
F32
/f32
- Suffix
F64
/f64
- Suffix
F64x
/f64x
- Suffix
F128
/f128
GCC currently supports all of these. Clang currently supports only _Float16
, but should add the rest.
Link to the draft: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2601.pdf
Link to demo: https://clang.godbolt.org/z/5xbq9919z
C++ also supports the same suffixes for the std
types, https://en.cppreference.com/w/cpp/types/floating-point
It sounds like these can't simply be redefines of float
and double
, see #50110 (cc @AaronBallman)