This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix loss of precision in jn tests


Due to the missing L suffix the argument in the jn tests was missing
enough precision for the long double test, causing spurious huge errors
on powerpc.

Andreas.

2012-02-07  Andreas Schwab  <schwab@linux-m68k.org>

	* sysdeps/powerpc/fpu/libm-test-ulps: Adjust ULPs for jn tests.

	* math/libm-test.inc (jn_test): Add missing L suffix.

diff --git a/math/libm-test.inc b/math/libm-test.inc
index 2843997..2c739fa 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -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@suse.de>, 1997.
 
@@ -3286,14 +3286,14 @@ jn_test (void)
   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);
 }
diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps
index 86c2e85..602d09c 100644
--- a/sysdeps/powerpc/fpu/libm-test-ulps
+++ b/sysdeps/powerpc/fpu/libm-test-ulps
@@ -657,34 +657,48 @@ ldouble: 2
 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 @@ double: 4
 float: 5
 idouble: 4
 ifloat: 5
-ildouble: 4
-ldouble: 4
+ildouble: 7
+ldouble: 7
 
 Function: "lgamma":
 double: 1

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]