aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r--sysdeps/ieee754/dbl-64/e_pow.c2
-rw-r--r--sysdeps/ieee754/flt-32/e_powf.c7
-rw-r--r--sysdeps/ieee754/ldbl-128/e_powl.c6
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_powl.c1
4 files changed, 14 insertions, 2 deletions
diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c
index 3c027fe..3b0bbe3 100644
--- a/sysdeps/ieee754/dbl-64/e_pow.c
+++ b/sysdeps/ieee754/dbl-64/e_pow.c
@@ -119,6 +119,8 @@ __ieee754_pow (double x, double y)
retval = huge * huge;
else if (retval == 0)
retval = tiny * tiny;
+ else
+ math_check_force_underflow_nonneg (retval);
return retval;
}
diff --git a/sysdeps/ieee754/flt-32/e_powf.c b/sysdeps/ieee754/flt-32/e_powf.c
index 8e8d918..1804296 100644
--- a/sysdeps/ieee754/flt-32/e_powf.c
+++ b/sysdeps/ieee754/flt-32/e_powf.c
@@ -244,7 +244,12 @@ __ieee754_powf(float x, float y)
z = one-(r-z);
GET_FLOAT_WORD(j,z);
j += (n<<23);
- if((j>>23)<=0) z = __scalbnf(z,n); /* subnormal output */
+ if((j>>23)<=0) /* subnormal output */
+ {
+ z = __scalbnf (z, n);
+ float force_underflow = z * z;
+ math_force_eval (force_underflow);
+ }
else SET_FLOAT_WORD(z,j);
return s*z;
}
diff --git a/sysdeps/ieee754/ldbl-128/e_powl.c b/sysdeps/ieee754/ldbl-128/e_powl.c
index f531385..7f3037f 100644
--- a/sysdeps/ieee754/ldbl-128/e_powl.c
+++ b/sysdeps/ieee754/ldbl-128/e_powl.c
@@ -435,7 +435,11 @@ __ieee754_powl (long double x, long double y)
j = o.parts32.w0;
j += (n << 16);
if ((j >> 16) <= 0)
- z = __scalbnl (z, n); /* subnormal output */
+ {
+ z = __scalbnl (z, n); /* subnormal output */
+ long double force_underflow = z * z;
+ math_force_eval (force_underflow);
+ }
else
{
o.parts32.w0 = j;
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_powl.c b/sysdeps/ieee754/ldbl-128ibm/e_powl.c
index c942f2f..90340e8 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_powl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_powl.c
@@ -409,6 +409,7 @@ __ieee754_powl (long double x, long double y)
r = (z * t1) / (t1 - two) - (w + z * w);
z = one - (r - z);
z = __scalbnl (z, n);
+ math_check_force_underflow_nonneg (z);
return s * z;
}
strong_alias (__ieee754_powl, __powl_finite)