about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-128/e_log10l.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/e_log10l.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/e_log10l.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sysdeps/ieee754/ldbl-128/e_log10l.c b/sysdeps/ieee754/ldbl-128/e_log10l.c
index bc2af9d850..efdcdbbe5c 100644
--- a/sysdeps/ieee754/ldbl-128/e_log10l.c
+++ b/sysdeps/ieee754/ldbl-128/e_log10l.c
@@ -170,16 +170,15 @@ __ieee754_log10l (x)
   long double z;
   long double y;
   int e;
+  int64_t hx, lx;
 
 /* Test for domain */
-  if (x <= 0.0L)
-    {
-      if (x == 0.0L)
-	return (-1.0L / (x - x));
-      else
-	return (x - x) / (x - x);
-    }
-  if (!__finitel (x))
+  GET_LDOUBLE_WORDS64 (hx, lx, x);
+  if (((hx & 0x7fffffffffffffffLL) | lx) == 0)
+    return (-1.0L / (x - x));
+  if (hx < 0)
+    return (x - x) / (x - x);
+  if (hx >= 0x7fff000000000000LL)
     return (x + x);
 
 /* separate mantissa from exponent */