[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r17023 - in /fsf/trunk/libc: ./ math/ sysdeps/generic/ sysdeps/gnu/ sysdeps/mach/hurd/ sysdeps/powerpc/fpu/
- To: commits@xxxxxxxxxx
- Subject: [Commits] r17023 - in /fsf/trunk/libc: ./ math/ sysdeps/generic/ sysdeps/gnu/ sysdeps/mach/hurd/ sysdeps/powerpc/fpu/
- From: eglibc@xxxxxxxxxx
- Date: Wed, 08 Feb 2012 00:02:08 -0000
Author: eglibc
Date: Wed Feb 8 00:02:07 2012
New Revision: 17023
Log:
Import glibc-mainline for 2012-02-08
Added:
fsf/trunk/libc/math/tst-CMPLX2.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/math/Makefile
fsf/trunk/libc/math/libm-test.inc
fsf/trunk/libc/sysdeps/generic/_G_config.h
fsf/trunk/libc/sysdeps/gnu/_G_config.h
fsf/trunk/libc/sysdeps/mach/hurd/_G_config.h
fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Feb 8 00:02:07 2012
@@ -1,3 +1,20 @@
+2012-02-07 Marek Polacek <polacek@xxxxxxxxxx>
+
+ * sysdeps/generic/_G_config.h: Remove _G_ARGS macro.
+ * sysdeps/gnu/_G_config.h: Likewise.
+ * sysdeps/mach/hurd/_G_config.h: Likewise.
+
+2012-02-07 Marek Polacek <polacek@xxxxxxxxxx>
+
+ * math/Makefile (tests): Add tst-CMPLX2.
+ * math/tst-CMPLX2.c: New file.
+
+2012-02-07 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
+
+ * sysdeps/powerpc/fpu/libm-test-ulps: Adjust ULPs for jn tests.
+
+ * math/libm-test.inc (jn_test): Add missing L suffix.
+
2012-02-06 Marek Polacek <polacek@xxxxxxxxxx>
* sysdeps/s390/asm-syntax.h: Remove __ELF__ conditionals.
Modified: fsf/trunk/libc/math/Makefile
==============================================================================
--- fsf/trunk/libc/math/Makefile (original)
+++ fsf/trunk/libc/math/Makefile Wed Feb 8 00:02:07 2012
@@ -91,7 +91,7 @@
tests = test-matherr test-fenv atest-exp atest-sincos atest-exp2 basic-test \
test-misc test-fpucw tst-definitions test-tgmath test-tgmath-ret \
bug-nextafter bug-nexttoward bug-tgmath1 test-tgmath-int \
- test-tgmath2 test-powl tst-CMPLX
+ test-tgmath2 test-powl tst-CMPLX tst-CMPLX2
# We do the `long double' tests only if this data type is available and
# distinct from `double'.
test-longdouble-yes = test-ldouble test-ildoubl
Modified: fsf/trunk/libc/math/libm-test.inc
==============================================================================
--- fsf/trunk/libc/math/libm-test.inc (original)
+++ fsf/trunk/libc/math/libm-test.inc Wed Feb 8 00:02:07 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2006, 2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@xxxxxxx>, 1997.
@@ -3286,14 +3286,14 @@
TEST_ff_f (jn, 10, 10.0, 0.207486106633358857697278723518753428L);
/* BZ #11589 .*/
- TEST_ff_f (jn, 2, 2.4048255576957729, 0.43175480701968038399746111312430703L);
- TEST_ff_f (jn, 3, 2.4048255576957729, 0.19899990535769083404042146764530813L);
- TEST_ff_f (jn, 4, 2.4048255576957729, 0.647466661641779720084932282551219891E-1L);
- TEST_ff_f (jn, 5, 2.4048255576957729, 0.163892432048058525099230549946147698E-1L);
- TEST_ff_f (jn, 6, 2.4048255576957729, 0.34048184720278336646673682895929161E-2L);
- TEST_ff_f (jn, 7, 2.4048255576957729, 0.60068836573295394221291569249883076E-3L);
- TEST_ff_f (jn, 8, 2.4048255576957729, 0.92165786705344923232879022467054148E-4L);
- TEST_ff_f (jn, 9, 2.4048255576957729, 0.12517270977961513005428966643852564E-4L)
+ TEST_ff_f (jn, 2, 2.4048255576957729L, 0.43175480701968038399746111312430703L);
+ TEST_ff_f (jn, 3, 2.4048255576957729L, 0.19899990535769083404042146764530813L);
+ TEST_ff_f (jn, 4, 2.4048255576957729L, 0.647466661641779720084932282551219891E-1L);
+ TEST_ff_f (jn, 5, 2.4048255576957729L, 0.163892432048058525099230549946147698E-1L);
+ TEST_ff_f (jn, 6, 2.4048255576957729L, 0.34048184720278336646673682895929161E-2L);
+ TEST_ff_f (jn, 7, 2.4048255576957729L, 0.60068836573295394221291569249883076E-3L);
+ TEST_ff_f (jn, 8, 2.4048255576957729L, 0.92165786705344923232879022467054148E-4L);
+ TEST_ff_f (jn, 9, 2.4048255576957729L, 0.12517270977961513005428966643852564E-4L)
END (jn);
}
Added: fsf/trunk/libc/math/tst-CMPLX2.c
==============================================================================
--- fsf/trunk/libc/math/tst-CMPLX2.c (added)
+++ fsf/trunk/libc/math/tst-CMPLX2.c Wed Feb 8 00:02:07 2012
@@ -1,0 +1,149 @@
+/* Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Marek Polacek <polacek@xxxxxxxxxx>, 2012.
+
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Adapted from gcc.dg/torture/builtin-complex-1.c test from GCC
+ testsuite written by Joseph S. Myers. */
+
+#include <complex.h>
+
+static int result;
+
+#define COMPARE_BODY(A, B, TYPE, COPYSIGN) \
+ do { \
+ TYPE s1 = COPYSIGN ((TYPE) 1.0, A); \
+ TYPE s2 = COPYSIGN ((TYPE) 1.0, B); \
+ if (s1 != s2) \
+ result |= 1; \
+ if ((__builtin_isnan (A) != 0) != (__builtin_isnan (B) != 0)) \
+ result |= 1; \
+ if ((A != B) != (__builtin_isnan (A) != 0)) \
+ result |= 1; \
+ } while (0)
+
+#ifdef CMPLX
+
+static void
+comparef (float a, float b)
+{
+ COMPARE_BODY (a, b, float, __builtin_copysignf);
+}
+
+static void
+compare (double a, double b)
+{
+ COMPARE_BODY (a, b, double, __builtin_copysign);
+}
+
+static void
+comparel (long double a, long double b)
+{
+ COMPARE_BODY (a, b, long double, __builtin_copysignl);
+}
+
+static void
+comparecf (_Complex float a, float r, float i)
+{
+ comparef (__real__ a, r);
+ comparef (__imag__ a, i);
+}
+
+static void
+comparec (_Complex double a, double r, double i)
+{
+ compare (__real__ a, r);
+ compare (__imag__ a, i);
+}
+
+static void
+comparecl (_Complex long double a, long double r, long double i)
+{
+ comparel (__real__ a, r);
+ comparel (__imag__ a, i);
+}
+
+#define VERIFY(A, B, TYPE, COMPARE, CL) \
+ do { \
+ TYPE a = A; \
+ TYPE b = B; \
+ _Complex TYPE cr = CL (a, b); \
+ static _Complex TYPE cs = CL (A, B); \
+ COMPARE (cr, A, B); \
+ COMPARE (cs, A, B); \
+ } while (0)
+
+#define ALL_CHECKS(PZ, NZ, NAN, INF, TYPE, COMPARE, CL) \
+ do { \
+ VERIFY (PZ, PZ, TYPE, COMPARE, CL); \
+ VERIFY (PZ, NZ, TYPE, COMPARE, CL); \
+ VERIFY (PZ, NAN, TYPE, COMPARE, CL); \
+ VERIFY (PZ, INF, TYPE, COMPARE, CL); \
+ VERIFY (NZ, PZ, TYPE, COMPARE, CL); \
+ VERIFY (NZ, NZ, TYPE, COMPARE, CL); \
+ VERIFY (NZ, NAN, TYPE, COMPARE, CL); \
+ VERIFY (NZ, INF, TYPE, COMPARE, CL); \
+ VERIFY (NAN, PZ, TYPE, COMPARE, CL); \
+ VERIFY (NAN, NZ, TYPE, COMPARE, CL); \
+ VERIFY (NAN, NAN, TYPE, COMPARE, CL); \
+ VERIFY (NAN, INF, TYPE, COMPARE, CL); \
+ VERIFY (INF, PZ, TYPE, COMPARE,CL); \
+ VERIFY (INF, NZ, TYPE, COMPARE, CL); \
+ VERIFY (INF, NAN, TYPE, COMPARE, CL); \
+ VERIFY (INF, INF, TYPE, COMPARE, CL); \
+ } while (0)
+
+static void
+check_float (void)
+{
+ ALL_CHECKS (0.0f, -0.0f, __builtin_nanf (""), __builtin_inff (),
+ float, comparecf, CMPLXF);
+}
+
+static void
+check_double (void)
+{
+ ALL_CHECKS (0.0, -0.0, __builtin_nan (""), __builtin_inf (),
+ double, comparec, CMPLX);
+}
+
+# ifndef NO_LONG_DOUBLE
+static void
+check_long_double (void)
+{
+ ALL_CHECKS (0.0l, -0.0l, __builtin_nanl (""), __builtin_infl (),
+ long double, comparecl, CMPLXL);
+}
+# endif
+#endif
+
+static int
+do_test (void)
+{
+#ifdef CMPLX
+ check_float ();
+ check_double ();
+# ifndef NO_LONG_DOUBLE
+ check_long_double ();
+# endif
+#endif
+
+ return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
Modified: fsf/trunk/libc/sysdeps/generic/_G_config.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/_G_config.h (original)
+++ fsf/trunk/libc/sysdeps/generic/_G_config.h Wed Feb 8 00:02:07 2012
@@ -83,7 +83,4 @@
#define _G_VTABLE_LABEL_PREFIX "_vt."
#define _G_VTABLE_LABEL_HAS_LENGTH 1
-
-#define _G_ARGS(ARGLIST) ARGLIST
-
#endif /* _G_config.h */
Modified: fsf/trunk/libc/sysdeps/gnu/_G_config.h
==============================================================================
--- fsf/trunk/libc/sysdeps/gnu/_G_config.h (original)
+++ fsf/trunk/libc/sysdeps/gnu/_G_config.h Wed Feb 8 00:02:07 2012
@@ -91,7 +91,4 @@
#define _G_VTABLE_LABEL_PREFIX "__vt_"
#define _G_VTABLE_LABEL_PREFIX_ID __vt_
-
-#define _G_ARGS(ARGLIST) ARGLIST
-
#endif /* _G_config.h */
Modified: fsf/trunk/libc/sysdeps/mach/hurd/_G_config.h
==============================================================================
--- fsf/trunk/libc/sysdeps/mach/hurd/_G_config.h (original)
+++ fsf/trunk/libc/sysdeps/mach/hurd/_G_config.h Wed Feb 8 00:02:07 2012
@@ -90,7 +90,4 @@
#define _G_VTABLE_LABEL_PREFIX "__vt_"
#define _G_VTABLE_LABEL_PREFIX_ID __vt_
-
-#define _G_ARGS(ARGLIST) ARGLIST
-
#endif /* _G_config.h */
Modified: fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps (original)
+++ fsf/trunk/libc/sysdeps/powerpc/fpu/libm-test-ulps Wed Feb 8 00:02:07 2012
@@ -657,34 +657,48 @@
Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813":
double: 3
idouble: 3
+ildouble: 1
+ldouble: 1
Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1":
double: 1
idouble: 1
+ildouble: 2
+ldouble: 2
Test "jn (5, 2.4048255576957729) == 0.163892432048058525099230549946147698E-1":
double: 3
float: 1
idouble: 3
ifloat: 1
+ildouble: 1
+ldouble: 1
Test "jn (6, 2.4048255576957729) == 0.34048184720278336646673682895929161E-2":
double: 4
float: 3
idouble: 4
ifloat: 3
+ildouble: 4
+ldouble: 4
Test "jn (7, 2.4048255576957729) == 0.60068836573295394221291569249883076E-3":
double: 3
float: 5
idouble: 3
ifloat: 5
+ildouble: 2
+ldouble: 2
Test "jn (8, 2.4048255576957729) == 0.92165786705344923232879022467054148E-4":
double: 3
float: 2
idouble: 3
ifloat: 2
+ildouble: 4
+ldouble: 4
Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4":
double: 1
float: 2
idouble: 1
ifloat: 2
+ildouble: 7
+ldouble: 7
# lgamma
Test "lgamma (0.7) == 0.260867246531666514385732417016759578":
@@ -1278,8 +1292,8 @@
float: 5
idouble: 4
ifloat: 5
-ildouble: 4
-ldouble: 4
+ildouble: 7
+ldouble: 7
Function: "lgamma":
double: 1
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits