about summary refs log tree commit diff
path: root/math/w_powl.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-03-28 09:32:12 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-03-28 09:32:12 +0000
commit41bf21a1e72c907b1a065727c3b5da43821ca6b0 (patch)
tree93612a0bb49dfead686c656b36da812fb810c2cf /math/w_powl.c
parentbdc6f13012da775a124596c81e40139ee8d2ca91 (diff)
downloadglibc-41bf21a1e72c907b1a065727c3b5da43821ca6b0.tar.gz
glibc-41bf21a1e72c907b1a065727c3b5da43821ca6b0.tar.xz
glibc-41bf21a1e72c907b1a065727c3b5da43821ca6b0.zip
Avoid overflows from long double functions using __kernel_standard.
Diffstat (limited to 'math/w_powl.c')
-rw-r--r--math/w_powl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/math/w_powl.c b/math/w_powl.c
index 5bb85976e3..37863889c3 100644
--- a/math/w_powl.c
+++ b/math/w_powl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
 
@@ -33,25 +33,25 @@ __powl (long double x, long double y)
 	    {
 	      if (y == 0.0L)
 		/* pow(NaN,0.0) */
-		return __kernel_standard (x, y, 242);
+		return __kernel_standard_l (x, y, 242);
 	    }
 	  else if (__finitel (x) && __finitel (y))
 	    {
 	      if (__isnanl (z))
 		/* pow neg**non-int */
-		return __kernel_standard (x, y, 224);
+		return __kernel_standard_l (x, y, 224);
 	      else if (x == 0.0L && y < 0.0L)
 		{
 		  if (signbit (x) && signbit (z))
 		    /* pow(-0.0,negative) */
-		    return __kernel_standard (x, y, 223);
+		    return __kernel_standard_l (x, y, 223);
 		  else
 		    /* pow(+0.0,negative) */
-		    return __kernel_standard (x, y, 243);
+		    return __kernel_standard_l (x, y, 243);
 		}
 	      else
 		/* pow overflow */
-		return __kernel_standard (x, y, 221);
+		return __kernel_standard_l (x, y, 221);
 	    }
 	}
     }
@@ -62,11 +62,11 @@ __powl (long double x, long double y)
 	{
 	  if (y == 0.0L)
 	    /* pow(0.0,0.0) */
-	    return __kernel_standard (x, y, 220);
+	    return __kernel_standard_l (x, y, 220);
 	}
       else
 	/* pow underflow */
-	return __kernel_standard (x, y, 222);
+	return __kernel_standard_l (x, y, 222);
     }
 
   return z;