Jakub Jelinek:
I think it would be nice if you also posted the changes you did to
test-ldouble.c and libm-test.inc, so that next time we could more
easily test it again.
See attachment. (I didn't do it properly at first, thus, I had to
propagate the changes to the right files …)
Tobias
/* Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <[email protected]>, 1997.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
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, see
<http://www.gnu.org/licenses/>. */
#include <quadmath.h>
#define FUNC(function) function##q
#define M_PIl M_PIq
#define M_PI_2l M_PI_2q
#define M_PI_4l M_PI_4q
#define M_LOG10El M_LOG10Eq
#define M_El M_Eq
#define M_LN2l M_LN2q
#define M_LN10l M_LN10q
#define M_SQRT2l M_SQRT2q
#define M_LOG2El M_LOG2Eq
#define FLOAT __float128
#define COMPLEX __complex128
#define TEST_MSG "testing __float128 (without inline functions)\n"
#define MATHCONST(x) x##Q
#define CHOOSE(Clongdouble,Cdouble,Cfloat,Cinlinelongdouble,Cinlinedouble,Cinlinefloat) Clongdouble
#define PRINTF_EXPR "Qe"
#define PRINTF_XEXPR "Qa"
#define PRINTF_NEXPR "Qf"
#define TEST_LDOUBLE 1
#ifndef __NO_MATH_INLINES
# define __NO_MATH_INLINES
#endif
#include "libm-test.c"
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 1e067fe..81b40b6 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -226,5 +226,5 @@ static FLOAT max_error, real_max_error, imag_max_error;
#define BUILD_COMPLEX(real, imag) \
- ({ __complex__ FLOAT __retval; \
+ ({ COMPLEX __retval; \
__real__ __retval = (real); \
__imag__ __retval = (imag); \
@@ -401,5 +401,5 @@ print_max_error (const char *func_name, FLOAT allowed, int xfail)
static void
-print_complex_max_error (const char *func_name, __complex__ FLOAT allowed,
+print_complex_max_error (const char *func_name, COMPLEX allowed,
__complex__ int xfail)
{
@@ -615,7 +615,7 @@ check_float (const char *test_name, FLOAT computed, FLOAT expected,
static void
-check_complex (const char *test_name, __complex__ FLOAT computed,
- __complex__ FLOAT expected,
- __complex__ FLOAT max_ulp, __complex__ int xfail,
+check_complex (const char *test_name, COMPLEX computed,
+ COMPLEX expected,
+ COMPLEX max_ulp, __complex__ int xfail,
int exception)
{
@@ -4208,4 +4208,6 @@ exp_test_upward (void)
+/* FIXME: Not yet implemented in libquadmath. */
+#if 0
static void
exp10_test (void)
@@ -4245,6 +4247,9 @@ exp10_test (void)
END (exp10);
}
+#endif
+/* FIXME: Not yet implemented in libquadmath. */
+#if 0
static void
exp2_test (void)
@@ -4289,4 +4294,5 @@ exp2_test (void)
END (exp2);
}
+#endif
@@ -5064,4 +5070,6 @@ frexp_test (void)
+/* FIXME: Not implemented in libquadmath - use lgamma/tgamma. */
+#if 0
static void
gamma_test (void)
@@ -5090,4 +5098,5 @@ gamma_test (void)
END (gamma);
}
+#endif
static void
@@ -6620,4 +6629,6 @@ log2_test (void)
+/* FIXME: Not implemented in libquadmath. */
+#if 0
static void
logb_test (void)
@@ -6691,4 +6702,5 @@ logb_test_downward (void)
END (logb_downward);
}
+#endif
static void
@@ -7015,4 +7027,6 @@ nextafter_test (void)
+/* FIXME: Not implemented in libquadmath. */
+#if 0
static void
nexttoward_test (void)
@@ -7103,4 +7117,5 @@ nexttoward_test (void)
END (nexttoward);
}
+#endif
@@ -8567,4 +8582,6 @@ round_test (void)
+/* FIXME: Not implemented in libquadmath. */
+#if 0
static void
scalb_test (void)
@@ -8625,4 +8642,5 @@ scalb_test (void)
END (scalb);
}
+#endif
@@ -9700,4 +9718,6 @@ yn_test (void)
+/* FIXME: Not implemented in libquadmath. */
+#if 0
static void
significand_test (void)
@@ -9712,4 +9732,5 @@ significand_test (void)
END (significand);
}
+#endif
@@ -9858,5 +9879,5 @@ main (int argc, char **argv)
{
fprintf (stderr, "wrong number of arguments");
- argp_help (&argp, stdout, ARGP_HELP_SEE, program_invocation_short_name);
+ argp_help (&argp, stdout, ARGP_HELP_SEE, argv[0]);
exit (EXIT_FAILURE);
}
@@ -9942,6 +9963,6 @@ main (int argc, char **argv)
exp_test_downward ();
exp_test_upward ();
- exp10_test ();
- exp2_test ();
+/* exp10_test ();
+ exp2_test ();*/
expm1_test ();
frexp_test ();
@@ -9951,12 +9972,12 @@ main (int argc, char **argv)
log1p_test ();
log2_test ();
- logb_test ();
- logb_test_downward ();
+/* logb_test ();
+ logb_test_downward ();*/
modf_test ();
ilogb_test ();
- scalb_test ();
+/* scalb_test ();*/
scalbn_test ();
scalbln_test ();
- significand_test ();
+/* significand_test ();*/
/* Power and absolute value functions: */
@@ -9974,5 +9995,5 @@ main (int argc, char **argv)
erf_test ();
erfc_test ();
- gamma_test ();
+/* gamma_test ();*/
lgamma_test ();
tgamma_test ();
@@ -10010,5 +10031,5 @@ main (int argc, char **argv)
copysign_test ();
nextafter_test ();
- nexttoward_test ();
+/* nexttoward_test (); */
/* maximum, minimum and positive difference functions */