aboutsummaryrefslogtreecommitdiff
path: root/math/tgmath.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2021-09-30 20:40:34 +0000
committerJoseph Myers <joseph@codesourcery.com>2021-09-30 20:40:34 +0000
commit52c057e37c3e0d1451f1c1cc0465eddee6cf236d (patch)
tree6ddd3bdcf0c535535da54268e43339070e3a594d /math/tgmath.h
parent1e1ecea62e899acb58c3fdf3b320a0833ddd0dff (diff)
downloadglibc-52c057e37c3e0d1451f1c1cc0465eddee6cf236d.zip
glibc-52c057e37c3e0d1451f1c1cc0465eddee6cf236d.tar.gz
glibc-52c057e37c3e0d1451f1c1cc0465eddee6cf236d.tar.bz2
Add exp10 macro to <tgmath.h> (bug 26108)
glibc has had exp10 functions since long before they were standardized; now they are standardized in TS 18661-4 and C2X, they are also specified there to have a corresponding type-generic macro. Add one to <tgmath.h>, so fixing bug 26108. glibc doesn't have other functions from TS 18661-4 yet, but when added, it will be natural to add the type-generic macro for each function family at the same time as the functions. Tested for x86_64.
Diffstat (limited to 'math/tgmath.h')
-rw-r--r--math/tgmath.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/math/tgmath.h b/math/tgmath.h
index e804283..13c7022 100644
--- a/math/tgmath.h
+++ b/math/tgmath.h
@@ -785,6 +785,11 @@
/* Compute base-2 logarithm of X. */
#define log2(Val) __TGMATH_UNARY_REAL_ONLY (Val, log2)
+#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C2X)
+/* Compute exponent to base ten. */
+#define exp10(Val) __TGMATH_UNARY_REAL_ONLY (Val, exp10)
+#endif
+
/* Power functions. */