]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - math/w_powl.c
Fix pow (qNaN, 0) result with -lieee (bug 20919), remove dead parts of wrappers.
[thirdparty/glibc.git] / math / w_powl.c
index be02e1eacc5cc7e84c2709526608711f5cc2b7a5..9b86651f55137090974597afab2e3d00ea7ea361 100644 (file)
@@ -29,13 +29,7 @@ __powl (long double x, long double y)
     {
       if (_LIB_VERSION != _IEEE_)
        {
-         if (isnan (x))
-           {
-             if (y == 0.0L)
-               /* pow(NaN,0.0) */
-               return __kernel_standard_l (x, y, 242);
-           }
-         else if (isfinite (x) && isfinite (y))
+         if (isfinite (x) && isfinite (y))
            {
              if (isnan (z))
                /* pow neg**non-int */
@@ -55,19 +49,11 @@ __powl (long double x, long double y)
            }
        }
     }
-  else if (__builtin_expect (z == 0.0L, 0) && isfinite (x) && isfinite (y)
+  else if (__builtin_expect (z == 0.0L, 0)
+          && isfinite (x) && x != 0 && isfinite (y)
           && _LIB_VERSION != _IEEE_)
-    {
-      if (x == 0.0L)
-       {
-         if (y == 0.0L)
-           /* pow(0.0,0.0) */
-           return __kernel_standard_l (x, y, 220);
-       }
-      else
-       /* pow underflow */
-       return __kernel_standard_l (x, y, 222);
-    }
+    /* pow underflow */
+    return __kernel_standard_l (x, y, 222);
 
   return z;
 }