aboutsummaryrefslogtreecommitdiff
path: root/math/tgmath.h
diff options
context:
space:
mode:
authorJoseph Myers <josmyers@redhat.com>2024-12-04 10:20:44 +0000
committerJoseph Myers <josmyers@redhat.com>2024-12-04 10:20:44 +0000
commit0ae0af68d8fa3bf6cbe1e4f1de5929ff71de67b3 (patch)
tree532181355fdc15427d84f2927db7ee807d2618c4 /math/tgmath.h
parent1c4cebb84b9e33aea9a90adfadb031d1f1eba927 (diff)
downloadglibc-0ae0af68d8fa3bf6cbe1e4f1de5929ff71de67b3.tar.xz
glibc-0ae0af68d8fa3bf6cbe1e4f1de5929ff71de67b3.zip
Implement C23 cospi
C23 adds various <math.h> function families originally defined in TS 18661-4. Add the cospi functions (cos(pi*x)). Tested for x86_64 and x86, and with build-many-glibcs.py.
Diffstat (limited to 'math/tgmath.h')
-rw-r--r--math/tgmath.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/math/tgmath.h b/math/tgmath.h
index f48f718b88..33418f8ac1 100644
--- a/math/tgmath.h
+++ b/math/tgmath.h
@@ -817,6 +817,10 @@
/* Tangent of X. */
#define tan(Val) __TGMATH_UNARY_REAL_IMAG (Val, tan, ctan)
+#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C23)
+/* Cosine of pi * X. */
+# define cospi(Val) __TGMATH_UNARY_REAL_ONLY (Val, cospi)
+#endif
/* Hyperbolic functions. */