aboutsummaryrefslogtreecommitdiff
path: root/math/math.h
diff options
context:
space:
mode:
Diffstat (limited to 'math/math.h')
-rw-r--r--math/math.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/math/math.h b/math/math.h
index 95b39b3..6e4bf9e 100644
--- a/math/math.h
+++ b/math/math.h
@@ -97,13 +97,30 @@ typedef _Float128x double_t;
# endif
#endif
-/* Define macros for the return value of ilogb.
+/* Define macros for the return value of ilogb, based on
+ __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN.
FP_ILOGB0 Expands to a value returned by `ilogb (0.0)'.
FP_ILOGBNAN Expands to a value returned by `ilogb (NAN)'.
*/
+#include <bits/fp-logb.h>
+#ifdef __USE_ISOC99
+# if __FP_LOGB0_IS_MIN
+# define FP_ILOGB0 (-2147483647 - 1)
+# else
+# define FP_ILOGB0 (-2147483647)
+# endif
+# if __FP_LOGBNAN_IS_MIN
+# define FP_ILOGBNAN (-2147483647 - 1)
+# else
+# define FP_ILOGBNAN 2147483647
+# endif
+#endif
+
+/* Get information about long double. */
+
#include <bits/mathdef.h>
/* Get the architecture specific values describing the floating-point