diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-11-22 14:59:45 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-11-22 14:59:45 +0000 |
commit | ef1e0867c0f6b1a39625f45aa8a8a9d83fe739be (patch) | |
tree | d2e415709ef56e81a48b4e4d451a2c2a7f497273 /sysdeps/ieee754 | |
parent | 1468ded38eb043991b3b0198ab55cacffb46ec04 (diff) | |
download | glibc-ef1e0867c0f6b1a39625f45aa8a8a9d83fe739be.zip glibc-ef1e0867c0f6b1a39625f45aa8a8a9d83fe739be.tar.gz glibc-ef1e0867c0f6b1a39625f45aa8a8a9d83fe739be.tar.bz2 |
Fix ldbl-128ibm powl spurious underflows.
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r-- | sysdeps/ieee754/ldbl-128ibm/e_powl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_powl.c b/sysdeps/ieee754/ldbl-128ibm/e_powl.c index 0fd4820..8216c49 100644 --- a/sysdeps/ieee754/ldbl-128ibm/e_powl.c +++ b/sysdeps/ieee754/ldbl-128ibm/e_powl.c @@ -149,7 +149,7 @@ __ieee754_powl (long double x, long double y) { long double z, ax, z_h, z_l, p_h, p_l; long double y1, t1, t2, r, s, t, u, v, w; - long double s2, s_h, s_l, t_h, t_l; + long double s2, s_h, s_l, t_h, t_l, ay; int32_t i, j, k, yisint, n; u_int32_t ix, iy; int32_t hx, hy; @@ -284,6 +284,10 @@ __ieee754_powl (long double x, long double y) return (hy > 0) ? huge * huge : tiny * tiny; } + ay = y > 0 ? y : -y; + if (ay < 0x1p-117) + y = y < 0 ? -0x1p-117 : 0x1p-117; + n = 0; /* take care subnormal number */ if (ix < 0x00100000) |