Fix BZ #14811 for ldbl-128 too.

[BZ #14811]
	* sysdeps/ieee754/ldbl-128/e_powl.c (__ieee754_powl): Saturate
	nonzero exponents with absolute value below 0x1p-128 to +/-
	0x1p-128.
This commit is contained in:
David S. Miller 2012-11-16 21:39:54 -08:00
parent 12df29e2d2
commit 8e18b86d4a
2 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2012-11-17 David S. Miller <davem@davemloft.net>
[BZ #14811]
* sysdeps/ieee754/ldbl-128/e_powl.c (__ieee754_powl): Saturate
nonzero exponents with absolute value below 0x1p-128 to +/-
0x1p-128.
2012-11-17 Joseph Myers <joseph@codesourcery.com> 2012-11-17 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/fxstatat.c: Include <string.h>. * sysdeps/unix/sysv/linux/fxstatat.c: Include <string.h>.

View file

@ -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 z, ax, z_h, z_l, p_h, p_l;
long double y1, t1, t2, r, s, t, u, v, w; 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; int32_t i, j, k, yisint, n;
u_int32_t ix, iy; u_int32_t ix, iy;
int32_t hx, hy; int32_t hx, hy;
@ -282,6 +282,10 @@ __ieee754_powl (long double x, long double y)
return (hy > 0) ? huge * huge : tiny * tiny; return (hy > 0) ? huge * huge : tiny * tiny;
} }
ay = y > 0 ? y : -y;
if (ay < 0x1p-128)
y = y < 0 ? -0x1p-128 : 0x1p-128;
n = 0; n = 0;
/* take care subnormal number */ /* take care subnormal number */
if (ix < 0x00010000) if (ix < 0x00010000)