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][BZ 4407] Fix lgamma sign bug for ldbl-128


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.

Pete Eberlein
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.

--- e_lgammal_r.c       2008-02-11 19:40:40.000000000 -0600
+++ e_lgammal_r.c.pae   2008-02-11 19:00:00.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]