summaryrefslogtreecommitdiff
path: root/sysdeps/ieee754/ldbl-128/e_powl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/e_powl.c')
-rw-r--r--sysdeps/ieee754/ldbl-128/e_powl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-128/e_powl.c b/sysdeps/ieee754/ldbl-128/e_powl.c
index 6d5b9d52d2..79644f696c 100644
--- a/sysdeps/ieee754/ldbl-128/e_powl.c
+++ b/sysdeps/ieee754/ldbl-128/e_powl.c
@@ -156,6 +156,13 @@ __ieee754_powl (x, y)
if ((iy | q.parts32.w1 | q.parts32.w2 | q.parts32.w3) == 0)
return one;
+ /* 1.0**y = 1; -1.0**+-Inf = 1 */
+ if (x == one)
+ return one;
+ if (x == -1.0L && iy == 0x7fff0000
+ && (q.parts32.w1 | q.parts32.w2 | q.parts32.w3) == 0)
+ return one;
+
/* +-NaN return x+y */
if ((ix > 0x7fff0000)
|| ((ix == 0x7fff0000)