summaryrefslogtreecommitdiff
path: root/test/math
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-03-29 04:50:56 -0500
committerWaldemar Brodkorb <wbx@openadk.org>2015-03-29 04:50:56 -0500
commitcd5f92704e1e17bbc0c15d197f3bc236c7dc9bf2 (patch)
tree1400302b543e4528aedea5d72731983559cfcf36 /test/math
parentad2bffbf1926051ef333f9899344f6bddf2c03cf (diff)
parent24946289317ea23bb0d1814cca0a499a905f7d6f (diff)
merge uClibc git master
Diffstat (limited to 'test/math')
-rw-r--r--test/math/compile_test.c20
-rw-r--r--test/math/libm-test.inc62
2 files changed, 35 insertions, 47 deletions
diff --git a/test/math/compile_test.c b/test/math/compile_test.c
index ab8c40c48..aedfde601 100644
--- a/test/math/compile_test.c
+++ b/test/math/compile_test.c
@@ -22,11 +22,11 @@ r += exp2f(float_x);
r += expf(float_x);
r += expm1f(float_x);
r += fabsf(float_x);
-/*r += fdimf(float_x, float_x); - uclibc does not have it (yet?) */
+r += fdimf(float_x, float_x);
r += floorf(float_x);
-/*r += fmaf(float_x, float_x, float_x); - uclibc does not have it (yet?) */
-/*r += fmaxf(float_x, float_x); - uclibc does not have it (yet?) */
-/*r += fminf(float_x, float_x); - uclibc does not have it (yet?) */
+r += fmaf(float_x, float_x, float_x);
+r += fmaxf(float_x, float_x);
+r += fminf(float_x, float_x);
r += fmodf(float_x, float_x);
r += frexpf(float_x, &int_x);
r += gammaf(float_x);
@@ -44,17 +44,17 @@ r += logf(float_x);
r += lrintf(float_x);
r += lroundf(float_x);
r += modff(float_x, &float_x);
-/*r += nearbyintf(float_x); - uclibc does not have it (yet?) */
-/*r += nexttowardf(float_x, long_double_x); - uclibc does not have it (yet?) */
+r += nearbyintf(float_x);
+r += nexttowardf(float_x, long_double_x);
r += powf(float_x, float_x);
r += remainderf(float_x, float_x);
-/*r += remquof(float_x, float_x, &int_x); - uclibc does not have it (yet?) */
+r += remquof(float_x, float_x, &int_x);
r += rintf(float_x);
r += roundf(float_x);
#ifdef __UCLIBC_SUSV3_LEGACY__
r += scalbf(float_x, float_x);
#endif
-/*r += scalblnf(float_x, long_x); - uclibc does not have it (yet?) */
+r += scalblnf(float_x, long_x);
r += scalbnf(float_x, int_x);
r += significandf(float_x);
r += sinf(float_x);
@@ -62,7 +62,7 @@ r += sinhf(float_x);
r += sqrtf(float_x);
r += tanf(float_x);
r += tanhf(float_x);
-/*r += tgammaf(float_x); - uclibc does not have it (yet?) */
+r += tgammaf(float_x);
r += truncf(float_x);
return r;
}
@@ -116,7 +116,7 @@ r += lroundl(long_double_x);
r += modfl(long_double_x, &long_double_x);
r += nearbyintl(long_double_x);
r += nextafterl(long_double_x, long_double_x);
-/* r += nexttowardl(long_double_x, long_double_x); - uclibc doesn't provide this [yet?] */
+r += nexttowardl(long_double_x, long_double_x);
r += powl(long_double_x, long_double_x);
r += remainderl(long_double_x, long_double_x);
r += remquol(long_double_x, long_double_x, &int_x);
diff --git a/test/math/libm-test.inc b/test/math/libm-test.inc
index d0f0a0c30..f50b48b81 100644
--- a/test/math/libm-test.inc
+++ b/test/math/libm-test.inc
@@ -115,6 +115,9 @@
# define _GNU_SOURCE
#endif
+#undef __CHK_COMPLEX_STUFF
+#define __CHK_COMPLEX_STUFF 0
+
#include "libm-test-ulps.h"
#include <complex.h>
#include <math.h>
@@ -1120,8 +1123,10 @@ cacosh_test (void)
END (cacosh, complex);
}
+#endif
+#if __CHK_COMPLEX_STUFF
static void
carg_test (void)
{
@@ -1188,7 +1193,9 @@ carg_test (void)
END (carg);
}
+#endif /* __CHK_COMPLEX_STUFF */
+#if 0
static void
casin_test (void)
{
@@ -1683,7 +1690,7 @@ ceil_test (void)
}
-#if 0
+#if __CHK_COMPLEX_STUFF
static void
cexp_test (void)
{
@@ -1746,8 +1753,9 @@ cexp_test (void)
END (cexp, complex);
}
+#endif /* __CHK_COMPLEX_STUFF */
-
+#if 0
static void
cimag_test (void)
{
@@ -2588,7 +2596,6 @@ fabs_test (void)
}
-#if 0
static void
fdim_test (void)
{
@@ -2624,7 +2631,6 @@ fdim_test (void)
END (fdim);
}
-#endif
static void
@@ -2694,7 +2700,6 @@ floor_test (void)
}
-#if 0
static void
fma_test (void)
{
@@ -2797,7 +2802,6 @@ fmin_test (void)
END (fmin);
}
-#endif
static void
@@ -3002,7 +3006,7 @@ isnormal_test (void)
END (isnormal);
}
-#if defined __DO_XSI_MATH__
+#if defined __DO_XSI_MATH__ && !(defined TEST_LDOUBLE || defined TEST_FLOAT)
static void
j0_test (void)
{
@@ -3414,8 +3418,6 @@ log1p_test (void)
END (log1p);
}
-
-#if 0
static void
log2_test (void)
{
@@ -3445,8 +3447,6 @@ log2_test (void)
END (log2);
}
-#endif
-
static void
logb_test (void)
@@ -3629,7 +3629,6 @@ modf_test (void)
}
-#if 0
static void
nearbyint_test (void)
{
@@ -3710,7 +3709,6 @@ nexttoward_test (void)
END (nexttoward);
}
-#endif
static void
@@ -3950,7 +3948,6 @@ remainder_test (void)
END (remainder);
}
-#if 0
static void
remquo_test (void)
{
@@ -3981,7 +3978,6 @@ remquo_test (void)
END (remquo);
}
-#endif
static void
rint_test (void)
@@ -4229,12 +4225,12 @@ round_test (void)
#endif
+#ifdef __UCLIBC_SUSV3_LEGACY__
static void
scalb_test (void)
{
START (scalb);
#ifndef TEST_LDOUBLE /* uclibc doesn't have scalbl */
-#ifdef __UCLIBC_SUSV3_LEGACY__ /* scalbf is susv3 legacy */
TEST_ff_f (scalb, 2.0, 0.5, nan_value, INVALID_EXCEPTION);
TEST_ff_f (scalb, 3.0, -2.5, nan_value, INVALID_EXCEPTION);
@@ -4285,11 +4281,10 @@ scalb_test (void)
TEST_ff_f (scalb, 0.8L, 4, 12.8L);
TEST_ff_f (scalb, -0.854375L, 5, -27.34L);
-#endif /* __UCLIBC_SUSV3_LEGACY__ */
#endif /* TEST_LDOUBLE */
END (scalb);
}
-
+#endif
static void
scalbn_test (void)
@@ -4313,7 +4308,6 @@ scalbn_test (void)
}
-#if 0
static void
scalbln_test (void)
{
@@ -4334,7 +4328,6 @@ scalbln_test (void)
END (scalbn);
}
-#endif
static void
@@ -4539,7 +4532,6 @@ tanh_test (void)
END (tanh);
}
-#if 0
static void
tgamma_test (void)
{
@@ -4571,7 +4563,6 @@ tgamma_test (void)
END (tgamma);
}
-#endif
#if 0
@@ -4651,7 +4642,7 @@ trunc_test (void)
}
#endif
-#if defined __DO_XSI_MATH__
+#if defined __DO_XSI_MATH__ && !(defined TEST_LDOUBLE || defined TEST_FLOAT)
static void
y0_test (void)
{
@@ -4973,17 +4964,15 @@ main (int argc, char **argv)
log_test ();
log10_test ();
log1p_test ();
-#if 0
log2_test ();
-#endif
logb_test ();
modf_test ();
ilogb_test ();
+#ifdef __UCLIBC_SUSV3_LEGACY__
scalb_test ();
+#endif
scalbn_test ();
-#if 0
scalbln_test ();
-#endif
significand_test ();
/* Power and absolute value functions: */
@@ -4998,16 +4987,12 @@ main (int argc, char **argv)
erfc_test ();
gamma_test ();
lgamma_test ();
-#if 0
tgamma_test ();
-#endif
/* Nearest integer functions: */
ceil_test ();
floor_test ();
-#if 0
nearbyint_test ();
-#endif
rint_test ();
#if 0
rint_test_tonearest ();
@@ -5025,13 +5010,10 @@ main (int argc, char **argv)
/* Remainder functions: */
fmod_test ();
remainder_test ();
-#if 0
remquo_test ();
-#endif
/* Manipulation functions: */
copysign_test ();
-#if 0
nextafter_test ();
nexttoward_test ();
@@ -5043,24 +5025,29 @@ main (int argc, char **argv)
/* Multiply and add: */
fma_test ();
+
/* Complex functions: */
cabs_test ();
+#if __CHK_COMPLEX_STUFF
+#if 0
cacos_test ();
cacosh_test ();
+#endif
carg_test ();
+#if 0
casin_test ();
casinh_test ();
catan_test ();
catanh_test ();
ccos_test ();
ccosh_test ();
+#endif
cexp_test ();
+#if 0
cimag_test ();
clog10_test ();
clog_test ();
-#if 0
conj_test ();
-#endif
cpow_test ();
cproj_test ();
creal_test ();
@@ -5070,9 +5057,10 @@ main (int argc, char **argv)
ctan_test ();
ctanh_test ();
#endif
+#endif /* __CHK_COMPLEX_STUFF */
/* Bessel functions: */
-#if defined __DO_XSI_MATH__
+#if defined __DO_XSI_MATH__ && !(defined TEST_LDOUBLE || defined TEST_FLOAT)
j0_test ();
j1_test ();
jn_test ();