about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128')
-rw-r--r--sysdeps/ieee754/ldbl-128/e_lgammal_r.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
index 2b44afb759..23ab9b9a43 100644
--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
@@ -782,6 +782,8 @@ __ieee754_lgammal_r (long double x, int *signgamp)
 	*signgamp = -1;
       else
 	*signgamp = 1;
+      if (q < 0x1p-120L)
+	return -__logl (q);
       z = q - p;
       if (z > 0.5L)
 	{
@@ -789,8 +791,6 @@ __ieee754_lgammal_r (long double x, int *signgamp)
 	  z = p - q;
 	}
       z = q * __sinl (PIL * z);
-      if (z == 0.0L)
-	return (*signgamp * huge * huge);
       w = __ieee754_lgammal_r (q, &i);
       z = __logl (PIL / z) - w;
       return (z);