summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128ibm/e_logl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128ibm/e_logl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_logl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_logl.c b/sysdeps/ieee754/ldbl-128ibm/e_logl.c
index 58d6bc6972..14acfc2db7 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_logl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_logl.c
@@ -219,6 +219,8 @@ __ieee754_logl(long double x)
/* On this interval the table is not used due to cancellation error. */
if ((x <= 1.0078125L) && (x >= 0.9921875L))
{
+ if (x == 1.0L)
+ return 0.0L;
z = x - 1.0L;
k = 64;
t = 1.0L;
@@ -268,7 +270,7 @@ __ieee754_logl(long double x)
/* Series expansion of log(1+z). */
w = z * z;
/* Avoid spurious underflows. */
- if (__glibc_unlikely(w <= ldbl_epsilon))
+ if (__glibc_unlikely (fabsl (z) <= ldbl_epsilon))
y = 0.0L;
else
{