]> sourceware.org Git - newlib-cygwin.git/blobdiff - newlib/libc/include/math.h
Minimal support for ISO/IEC TS 18661-3.
[newlib-cygwin.git] / newlib / libc / include / math.h
index ba1a8a17ef4368eabb7a0d116f50b6a7d34546ce..0b6494e6afef49e1a06a3582e48da4a0712b3f20 100644 (file)
@@ -146,7 +146,17 @@ extern int isnan (double);
   #define __TMP_FLT_EVAL_METHOD
 #endif /* FLT_EVAL_METHOD */
 #if defined FLT_EVAL_METHOD
-  #if FLT_EVAL_METHOD == 0
+/* FLT_EVAL_METHOD == 16 has meaning as defined in ISO/IEC TS 18661-3,
+ * which provides non-compliant extensions to C and POSIX (by adding
+ * additional positive values for FLT_EVAL_METHOD).  It effectively has
+ * same meaning as the C99 and C11 definitions for value 0, while also
+ * serving as a flag that the _Float16 (float16_t) type exists.
+ *
+ * FLT_EVAL_METHOD could be any number of bits of supported floating point
+ * format (e.g. 32, 64, 128), but currently only AArch64 and few other targets
+ * might define that as 16.  */
+  #if (FLT_EVAL_METHOD == 0) \
+      || (FLT_EVAL_METHOD == 16)
     typedef float  float_t;
     typedef double double_t;
    #elif FLT_EVAL_METHOD == 1
This page took 0.025041 seconds and 5 git commands to generate.