This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

[PATCH] Fix erfcl(-inf), minor sparc64 ulps update


Hi!

erfcl(-inf) gave 0 instead of 2 in quad version. This patch fixes it, plus
updates slightly sparc64 ulps, so that at least float and double tests pass.
Many long double tests fail ATM, but the most common reason is that
test-libm.inc has very imprecise expected results for many functions.

2001-09-27  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update.
	* sysdeps/ieee754/ldbl-128/s_erfl.c (__erfcl): Fix erfc(-inf).

--- libc/sysdeps/sparc/sparc64/fpu/libm-test-ulps.jj	Mon Jul 23 15:19:49 2001
+++ libc/sysdeps/sparc/sparc64/fpu/libm-test-ulps	Thu Sep 27 15:46:56 2001
@@ -562,6 +562,16 @@ ifloat: 1
 Test "j0 (2.0) == 0.22389077914123566805":
 float: 2
 ifloat: 2
+Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1"
+double: 1
+idouble: 1
+float: 1
+ifloat: 1
+Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1"
+double: 1
+idouble: 1
+float: 1
+ifloat: 1
 Test "j0 (8.0) == 0.17165080713755390609":
 float: 1
 ifloat: 1
--- libc/sysdeps/ieee754/ldbl-128/s_erfl.c.jj	Wed Sep 19 06:13:01 2001
+++ libc/sysdeps/ieee754/ldbl-128/s_erfl.c	Thu Sep 27 15:59:19 2001
@@ -816,7 +816,7 @@ weak_alias (__erf, erfl)
   if (ix >= 0x7fff0000)
     {				/* erfc(nan)=nan */
       /* erfc(+-inf)=0,2 */
-      return (long double) (((sign & 0xffff) >> 15) << 1) + one / x;
+      return (long double) (((u_int32_t) sign >> 31) << 1) + one / x;
     }
 
   if (ix < 0x3ffd0000) /* |x| <1/4 */

	Jakub


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