gcc: Floating Types

1 
1 6.11 Additional Floating Types
1 ==============================
1 
1 ISO/IEC TS 18661-3:2015 defines C support for additional floating types
1 '_FloatN' and '_FloatNx', and GCC supports these type names; the set of
1 types supported depends on the target architecture.  These types are not
1 supported when compiling C++.  Constants with these types use suffixes
1 'fN' or 'FN' and 'fNx' or 'FNx'.  These type names can be used together
1 with '_Complex' to declare complex types.
1 
1  As an extension, GNU C and GNU C++ support additional floating types,
1 which are not supported by all targets.
1    * '__float128' is available on i386, x86_64, IA-64, and hppa HP-UX,
1      as well as on PowerPC GNU/Linux targets that enable the vector
1      scalar (VSX) instruction set.  '__float128' supports the 128-bit
1      floating type.  On i386, x86_64, PowerPC, and IA-64 other than
1      HP-UX, '__float128' is an alias for '_Float128'.  On hppa and IA-64
1      HP-UX, '__float128' is an alias for 'long double'.
1 
1    * '__float80' is available on the i386, x86_64, and IA-64 targets,
1      and supports the 80-bit ('XFmode') floating type.  It is an alias
1      for the type name '_Float64x' on these targets.
1 
1    * '__ibm128' is available on PowerPC targets, and provides access to
1      the IBM extended double format which is the current format used for
1      'long double'.  When 'long double' transitions to '__float128' on
1      PowerPC in the future, '__ibm128' will remain for use in
1      conversions between the two types.
1 
1  Support for these additional types includes the arithmetic operators:
1 add, subtract, multiply, divide; unary arithmetic operators; relational
1 operators; equality operators; and conversions to and from integer and
1 other floating types.  Use a suffix 'w' or 'W' in a literal constant of
1 type '__float80' or type '__ibm128'.  Use a suffix 'q' or 'Q' for
1 '_float128'.
1 
1  In order to use '_Float128', '__float128', and '__ibm128' on PowerPC
1 Linux systems, you must use the '-mfloat128' option.  It is expected in
1 future versions of GCC that '_Float128' and '__float128' will be enabled
1 automatically.
1 
1  The '_Float128' type is supported on all systems where '__float128' is
1 supported or where 'long double' has the IEEE binary128 format.  The
1 '_Float64x' type is supported on all systems where '__float128' is
1 supported.  The '_Float32' type is supported on all systems supporting
1 IEEE binary32; the '_Float64' and '_Float32x' types are supported on all
1 systems supporting IEEE binary64.  The '_Float16' type is supported on
1 AArch64 systems by default, and on ARM systems when the IEEE format for
1 16-bit floating-point types is selected with '-mfp16-format=ieee'.  GCC
1 does not currently support '_Float128x' on any systems.
1 
1  On the i386, x86_64, IA-64, and HP-UX targets, you can declare complex
1 types using the corresponding internal complex type, 'XCmode' for
1 '__float80' type and 'TCmode' for '__float128' type:
1 
1      typedef _Complex float __attribute__((mode(TC))) _Complex128;
1      typedef _Complex float __attribute__((mode(XC))) _Complex80;
1 
1  On the PowerPC Linux VSX targets, you can declare complex types using
1 the corresponding internal complex type, 'KCmode' for '__float128' type
1 and 'ICmode' for '__ibm128' type:
1 
1      typedef _Complex float __attribute__((mode(KC))) _Complex_float128;
1      typedef _Complex float __attribute__((mode(IC))) _Complex_ibm128;
1