aboutsummaryrefslogtreecommitdiff
path: root/math/test-tgmath.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/test-tgmath.c')
-rw-r--r--math/test-tgmath.c126
1 files changed, 123 insertions, 3 deletions
diff --git a/math/test-tgmath.c b/math/test-tgmath.c
index f3bcac4..c1cd3fc 100644
--- a/math/test-tgmath.c
+++ b/math/test-tgmath.c
@@ -1,5 +1,5 @@
/* Test compilation of tgmath macros.
- Copyright (C) 2001-2024 Free Software Foundation, Inc.
+ Copyright (C) 2001-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -48,7 +48,7 @@ volatile int count_cdouble;
volatile int count_cfloat;
volatile int count_cldouble;
-#define NCALLS 168
+#define NCALLS 194
#define NCALLS_INT 4
#define NCCALLS 47
@@ -227,17 +227,24 @@ F(compile_test) (void)
int i = 2;
int saved_count;
long int j;
- long long int k;
+ long long int k = 2;
intmax_t m;
uintmax_t um;
a = cos (cos (x));
+ a = cospi (cospi (x));
+ b = acospi (acospi (a));
b = acos (acos (a));
a = sin (sin (x));
+ b = sinpi (sinpi (x));
+ b = asinpi (asinpi (a));
b = asin (asin (a));
a = tan (tan (x));
+ b = tanpi (tanpi (x));
+ b = atanpi (atanpi (a));
b = atan (atan (a));
c = atan2 (atan2 (a, c), atan2 (b, x));
+ b = atan2pi (atan2pi (a, c), atan2pi (b, x));
a = cosh (cosh (x));
b = acosh (acosh (a));
a = sinh (sinh (x));
@@ -261,7 +268,12 @@ F(compile_test) (void)
a = log10p1 (log10p1 (x));
a = logp1 (logp1 (x));
a = pow (pow (x, a), pow (c, b));
+ b = pown (pown (x, k), k);
+ b = compoundn (compoundn (x, k), k);
+ b = rootn (rootn (x, k), k);
+ a = powr (powr (x, a), powr (c, b));
b = sqrt (sqrt (a));
+ a = rsqrt (rsqrt (b));
a = hypot (hypot (x, b), hypot (c, a));
b = cbrt (cbrt (a));
a = ceil (ceil (x));
@@ -350,12 +362,19 @@ F(compile_test) (void)
if (0)
{
a = cos (y);
+ a = cospi (y);
a = acos (y);
+ a = acospi (y);
a = sin (y);
+ a = sinpi (y);
a = asin (y);
+ a = asinpi (y);
a = tan (y);
+ a = tanpi (y);
a = atan (y);
+ a = atanpi (y);
a = atan2 (y, y);
+ a = atan2pi (y, y);
a = cosh (y);
a = acosh (y);
a = sinh (y);
@@ -379,7 +398,12 @@ F(compile_test) (void)
a = log10p1 (y);
a = logp1 (y);
a = pow (y, y);
+ a = pown (y, 12345);
+ a = compoundn (y, 12345);
+ a = rootn (y, 12345);
+ a = powr (y, y);
a = sqrt (y);
+ a = rsqrt (y);
a = hypot (y, y);
a = cbrt (y);
a = ceil (y);
@@ -468,6 +492,14 @@ TYPE
}
TYPE
+(F(cospi)) (TYPE x)
+{
+ ++count;
+ P ();
+ return x;
+}
+
+TYPE
(F(acos)) (TYPE x)
{
++count;
@@ -476,6 +508,14 @@ TYPE
}
TYPE
+(F(acospi)) (TYPE x)
+{
+ ++count;
+ P ();
+ return x;
+}
+
+TYPE
(F(sin)) (TYPE x)
{
++count;
@@ -484,6 +524,14 @@ TYPE
}
TYPE
+(F(sinpi)) (TYPE x)
+{
+ ++count;
+ P ();
+ return x;
+}
+
+TYPE
(F(asin)) (TYPE x)
{
++count;
@@ -492,6 +540,14 @@ TYPE
}
TYPE
+(F(asinpi)) (TYPE x)
+{
+ ++count;
+ P ();
+ return x;
+}
+
+TYPE
(F(tan)) (TYPE x)
{
++count;
@@ -500,6 +556,14 @@ TYPE
}
TYPE
+(F(tanpi)) (TYPE x)
+{
+ ++count;
+ P ();
+ return x;
+}
+
+TYPE
(F(atan)) (TYPE x)
{
++count;
@@ -516,6 +580,22 @@ TYPE
}
TYPE
+(F(atanpi)) (TYPE x)
+{
+ ++count;
+ P ();
+ return x;
+}
+
+TYPE
+(F(atan2pi)) (TYPE x, TYPE y)
+{
+ ++count;
+ P ();
+ return x + y;
+}
+
+TYPE
(F(cosh)) (TYPE x)
{
++count;
@@ -700,6 +780,38 @@ TYPE
}
TYPE
+(F(pown)) (TYPE x, long long int y)
+{
+ ++count;
+ P ();
+ return x + y;
+}
+
+TYPE
+(F(powr)) (TYPE x, TYPE y)
+{
+ ++count;
+ P ();
+ return x + y;
+}
+
+TYPE
+(F(compoundn)) (TYPE x, long long int y)
+{
+ ++count;
+ P ();
+ return x + y;
+}
+
+TYPE
+(F(rootn)) (TYPE x, long long int y)
+{
+ ++count;
+ P ();
+ return x + y;
+}
+
+TYPE
(F(sqrt)) (TYPE x)
{
++count;
@@ -708,6 +820,14 @@ TYPE
}
TYPE
+(F(rsqrt)) (TYPE x)
+{
+ ++count;
+ P ();
+ return x;
+}
+
+TYPE
(F(hypot)) (TYPE x, TYPE y)
{
++count;