summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-04-10 04:58:03 +0000
committerUlrich Drepper <drepper@redhat.com>2008-04-10 04:58:03 +0000
commitfacd1d8ef35edb863523a7165a64d55196cc2d36 (patch)
tree93d32c46114d13e0482edb7f281a43f2c5b765f1
parentaece054b306608e8898adac2320f75364c1b42da (diff)
downloadglibc-facd1d8ef35edb863523a7165a64d55196cc2d36.tar.gz
glibc-facd1d8ef35edb863523a7165a64d55196cc2d36.tar.xz
glibc-facd1d8ef35edb863523a7165a64d55196cc2d36.zip
[BZ #4407]
2008-02-12  Pete Eberlein  <eberlein@us.ibm.com>
	[BZ #4407]
	* sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r):
	Preserve sign in signgamp when x is zero.
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/ieee754/ldbl-128/e_lgammal_r.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 247c79247f..374553e507 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-02-12  Pete Eberlein  <eberlein@us.ibm.com>
+
+	[BZ #4407]
+	* sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r):
+	Preserve sign in signgamp when x is zero.
+
 2007-10-26  Steven Munroe  <sjmunroe@us.ibm.com>
 
 	* sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S: New File.
diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
index b9302974c0..d080448476 100644
--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
@@ -772,6 +772,12 @@ __ieee754_lgammal_r (x, signgamp)
   if (! __finitel (x))
     return x * x;
 
+  if (x == 0.0L)
+    {
+      if (__signbitl (x))
+        *signgamp = -1;
+    }
+
   if (x < 0.0L)
     {
       q = -x;