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]

Re: [PATCH][BZ 4407] Fix lgamma sign bug for ldbl-128


On Tue, 2008-02-12 at 16:52 -0800, Pete Eberlein wrote:
> Regarding Bugzilla 4407:
> 
> http://sourceware.org/bugzilla/show_bug.cgi?id=4407
> 
> The following patch fixes the case for negative zero in the ldbl-128
> implementation of lgammal.  This resolves the make check error for
> ldbl-128 and ldbl-128ibm.

Included is a patch with the full source path for the file in the diff
string.

Ryan S. Arnold
IBM Linux Technology Center
Linux Toolchain Development


2008-02-12  Pete Eberlein <eberlein@us.ibm.com>

	[BZ4407]
	* sysdeps/ieee754/ldbl-128/e_lgammal_r.c: Preserve sign in
	signgamp when x is zero.

--- libc/sysdeps/ieee754/ldbl-128/e_lgammal_r.c	2002-08-26 17:40:02.000000000 -0500
+++ libc-patched/sysdeps/ieee754/ldbl-128/e_lgammal_r.c	2008-02-19 10:03:32.000000000 -0600
@@ -772,6 +772,12 @@
   if (! __finitel (x))
     return x * x;
 
+  if (x == 0.0L) 
+    {
+      if (__signbitl (x))
+        *signgamp = -1;
+    }
+
   if (x < 0.0L)
     {
       q = -x;

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