diff options
| author | Joseph Myers <josmyers@redhat.com> | 2024-12-04 10:20:44 +0000 |
|---|---|---|
| committer | Joseph Myers <josmyers@redhat.com> | 2024-12-04 10:20:44 +0000 |
| commit | 0ae0af68d8fa3bf6cbe1e4f1de5929ff71de67b3 (patch) | |
| tree | 532181355fdc15427d84f2927db7ee807d2618c4 /math/test-tgmath.c | |
| parent | 1c4cebb84b9e33aea9a90adfadb031d1f1eba927 (diff) | |
| download | glibc-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/test-tgmath.c')
| -rw-r--r-- | math/test-tgmath.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/math/test-tgmath.c b/math/test-tgmath.c index f3bcac4866..14f4fe4e01 100644 --- a/math/test-tgmath.c +++ b/math/test-tgmath.c @@ -48,7 +48,7 @@ volatile int count_cdouble; volatile int count_cfloat; volatile int count_cldouble; -#define NCALLS 168 +#define NCALLS 170 #define NCALLS_INT 4 #define NCCALLS 47 @@ -232,6 +232,7 @@ F(compile_test) (void) uintmax_t um; a = cos (cos (x)); + a = cospi (cospi (x)); b = acos (acos (a)); a = sin (sin (x)); b = asin (asin (a)); @@ -350,6 +351,7 @@ F(compile_test) (void) if (0) { a = cos (y); + a = cospi (y); a = acos (y); a = sin (y); a = asin (y); @@ -468,6 +470,14 @@ TYPE } TYPE +(F(cospi)) (TYPE x) +{ + ++count; + P (); + return x; +} + +TYPE (F(acos)) (TYPE x) { ++count; |
