Index: uspace/lib/math/generic/pow.c
===================================================================
--- uspace/lib/math/generic/pow.c	(revision f250c5ad6a76a78db608d678ea270ea17a01cbe0)
+++ uspace/lib/math/generic/pow.c	(revision 197d59d9658751a211754c995b0426f97b88edf2)
@@ -136,5 +136,5 @@
 		if(k>20) {
 		    j = ly>>(52-k);
-		    if((j<<(52-k))==(int32_t)ly) yisint = 2-(j&1);
+		    if((j<<(52-k))==ly) yisint = 2-(j&1);
 		} else if(ly==0) {
 		    j = iy>>(20-k);
@@ -148,5 +148,5 @@
 	    if (iy==0x7ff00000) {	/* y is +-inf */
 	        if(((ix-0x3ff00000)|lx)==0)
-		    return  one;	/* (-1)**+-inf is NaN */
+		    return  one;	/* (-1)**+-inf is 1 */
 	        else if (ix >= 0x3ff00000)/* (|x|>1)**+-inf = inf,0 */
 		    return (hy>=0)? y: zero;
@@ -157,13 +157,8 @@
 		if(hy<0) return one/x; else return x;
 	    }
-            if(hy==0x40000000) return x*x;   /* y is  2 */
-            if(hy==0x40080000) return x*x*x; /* y is  3 */
-            if(hy==0x40100000) {             /* y is  4 */
-                u = x*x;
-                return u*u;
-            }
-	    if(hy==0x3fe00000) {             /* y is  0.5 */
+	    if(hy==0x40000000) return x*x; /* y is  2 */
+	    if(hy==0x3fe00000) {	/* y is  0.5 */
 		if(hx>=0)	/* x >= +0 */
-                    return sqrt(x);
+		return sqrt(x);
 	    }
 	}
@@ -314,5 +309,4 @@
 	if((j>>20)<=0) z = scalbn(z,n);	/* subnormal output */
 	else SET_HIGH_WORD(z,j);
-
 	return s*z;
 }
