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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_logl.c b/sysdeps/ieee754/ldbl-128ibm/e_logl.c
index b7db2b9784..58d6bc6972 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_logl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_logl.c
@@ -229,6 +229,14 @@ __ieee754_logl(long double x)
/* Extract exponent and reduce domain to 0.703125 <= u < 1.40625 */
unsigned int w0;
e = (int) (m >> 20) - (int) 0x3fe;
+ if (e == -1022)
+ {
+ x *= 0x1p106L;
+ xhi = ldbl_high (x);
+ EXTRACT_WORDS (hx, lx, xhi);
+ m = hx;
+ e = (int) (m >> 20) - (int) 0x3fe - 106;
+ }
m &= 0xfffff;
w0 = m | 0x3fe00000;
m |= 0x100000;