summary refs log tree commit diff
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 3c027fe7f5..3b0bbe3103 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 8e8d918456..18042960c2 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 f531385232..7f3037fb51 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 c942f2f249..90340e890e 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)