summaryrefslogtreecommitdiff
path: root/test/math/libm-test.inc
diff options
context:
space:
mode:
Diffstat (limited to 'test/math/libm-test.inc')
-rw-r--r--test/math/libm-test.inc82
1 files changed, 38 insertions, 44 deletions
diff --git a/test/math/libm-test.inc b/test/math/libm-test.inc
index c9c2c8b41..f50b48b81 100644
--- a/test/math/libm-test.inc
+++ b/test/math/libm-test.inc
@@ -13,9 +13,8 @@
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
/* Part of testsuite for libm.
@@ -26,17 +25,17 @@
FUNC(function): converts general function name (like cos) to
name with correct suffix (e.g. cosl or cosf)
MATHCONST(x): like FUNC but for constants (e.g convert 0.0 to 0.0L)
- FLOAT: floating point type to test
- - TEST_MSG: informal message to be displayed
+ FLOAT: floating point type to test
+ - TEST_MSG: informal message to be displayed
CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat):
chooses one of the parameters as delta for testing
equality
- PRINTF_EXPR Floating point conversion specification to print a variable
+ PRINTF_EXPR Floating point conversion specification to print a variable
of type FLOAT with printf. PRINTF_EXPR just contains
the specifier, not the percent and width arguments,
e.g. "f".
PRINTF_XEXPR Like PRINTF_EXPR, but print in hexadecimal format.
- PRINTF_NEXPR Like PRINTF_EXPR, but print nice. */
+ PRINTF_NEXPR Like PRINTF_EXPR, but print nice. */
/* This testsuite has currently tests for:
acos, acosh, asin, asinh, atan, atan2, atanh,
@@ -116,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>
@@ -1121,8 +1123,10 @@ cacosh_test (void)
END (cacosh, complex);
}
+#endif
+#if __CHK_COMPLEX_STUFF
static void
carg_test (void)
{
@@ -1189,7 +1193,9 @@ carg_test (void)
END (carg);
}
+#endif /* __CHK_COMPLEX_STUFF */
+#if 0
static void
casin_test (void)
{
@@ -1684,7 +1690,7 @@ ceil_test (void)
}
-#if 0
+#if __CHK_COMPLEX_STUFF
static void
cexp_test (void)
{
@@ -1747,8 +1753,9 @@ cexp_test (void)
END (cexp, complex);
}
+#endif /* __CHK_COMPLEX_STUFF */
-
+#if 0
static void
cimag_test (void)
{
@@ -2589,7 +2596,6 @@ fabs_test (void)
}
-#if 0
static void
fdim_test (void)
{
@@ -2625,7 +2631,6 @@ fdim_test (void)
END (fdim);
}
-#endif
static void
@@ -2695,7 +2700,6 @@ floor_test (void)
}
-#if 0
static void
fma_test (void)
{
@@ -2798,7 +2802,6 @@ fmin_test (void)
END (fmin);
}
-#endif
static void
@@ -3003,6 +3006,7 @@ isnormal_test (void)
END (isnormal);
}
+#if defined __DO_XSI_MATH__ && !(defined TEST_LDOUBLE || defined TEST_FLOAT)
static void
j0_test (void)
{
@@ -3149,6 +3153,7 @@ jn_test (void)
END (jn);
}
+#endif /* __DO_XSI_MATH__ */
static void
@@ -3413,8 +3418,6 @@ log1p_test (void)
END (log1p);
}
-
-#if 0
static void
log2_test (void)
{
@@ -3444,8 +3447,6 @@ log2_test (void)
END (log2);
}
-#endif
-
static void
logb_test (void)
@@ -3628,7 +3629,6 @@ modf_test (void)
}
-#if 0
static void
nearbyint_test (void)
{
@@ -3709,7 +3709,6 @@ nexttoward_test (void)
END (nexttoward);
}
-#endif
static void
@@ -3949,7 +3948,6 @@ remainder_test (void)
END (remainder);
}
-#if 0
static void
remquo_test (void)
{
@@ -3980,7 +3978,6 @@ remquo_test (void)
END (remquo);
}
-#endif
static void
rint_test (void)
@@ -4228,11 +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 */
TEST_ff_f (scalb, 2.0, 0.5, nan_value, INVALID_EXCEPTION);
TEST_ff_f (scalb, 3.0, -2.5, nan_value, INVALID_EXCEPTION);
@@ -4283,10 +4281,10 @@ scalb_test (void)
TEST_ff_f (scalb, 0.8L, 4, 12.8L);
TEST_ff_f (scalb, -0.854375L, 5, -27.34L);
-
+#endif /* TEST_LDOUBLE */
END (scalb);
}
-
+#endif
static void
scalbn_test (void)
@@ -4310,7 +4308,6 @@ scalbn_test (void)
}
-#if 0
static void
scalbln_test (void)
{
@@ -4331,7 +4328,6 @@ scalbln_test (void)
END (scalbn);
}
-#endif
static void
@@ -4515,7 +4511,8 @@ tanh_test (void)
START (tanh);
TEST_f_f (tanh, 0, 0);
- TEST_f_f (tanh, minus_zero, minus_zero);
+ /* vda: uclibc: added IGNORE_ZERO_INF_SIGN to treat -0 as ok */
+ TEST_f_f (tanh, minus_zero, minus_zero, IGNORE_ZERO_INF_SIGN);
#ifndef TEST_INLINE
TEST_f_f (tanh, plus_infty, 1);
@@ -4535,7 +4532,6 @@ tanh_test (void)
END (tanh);
}
-#if 0
static void
tgamma_test (void)
{
@@ -4567,7 +4563,6 @@ tgamma_test (void)
END (tgamma);
}
-#endif
#if 0
@@ -4647,6 +4642,7 @@ trunc_test (void)
}
#endif
+#if defined __DO_XSI_MATH__ && !(defined TEST_LDOUBLE || defined TEST_FLOAT)
static void
y0_test (void)
{
@@ -4789,6 +4785,7 @@ yn_test (void)
END (yn);
}
+#endif /* __DO_XSI_MATH__ */
static void
@@ -4967,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: */
@@ -4992,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 ();
@@ -5019,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 ();
@@ -5037,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 ();
@@ -5064,16 +5057,17 @@ main (int argc, char **argv)
ctan_test ();
ctanh_test ();
#endif
+#endif /* __CHK_COMPLEX_STUFF */
/* Bessel functions: */
-#if 0
+#if defined __DO_XSI_MATH__ && !(defined TEST_LDOUBLE || defined TEST_FLOAT)
j0_test ();
j1_test ();
jn_test ();
y0_test ();
y1_test ();
yn_test ();
-#endif
+#endif /* __DO_XSI_MATH__ */
if (output_ulps)
fclose (ulps_file);