about summary refs log tree commit diff
path: root/src/math/floor.c
diff options
context:
space:
mode:
authornsz <nsz@port70.net>2012-03-29 14:09:57 +0200
committernsz <nsz@port70.net>2012-03-29 14:09:57 +0200
commit7eabe8e69044e3683376165934a17210b6b148b9 (patch)
tree8c5c8be0860bb475a8075c54fe6cb86124b2753e /src/math/floor.c
parentd79ac8c38f3992b4547d155f5c8e612f51d9b32e (diff)
downloadmusl-7eabe8e69044e3683376165934a17210b6b148b9.tar.gz
musl-7eabe8e69044e3683376165934a17210b6b148b9.tar.xz
musl-7eabe8e69044e3683376165934a17210b6b148b9.zip
math: minor cleanups in ceil and floor
Diffstat (limited to 'src/math/floor.c')
-rw-r--r--src/math/floor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/math/floor.c b/src/math/floor.c
index 521a148e..ecb9dde8 100644
--- a/src/math/floor.c
+++ b/src/math/floor.c
@@ -50,7 +50,7 @@ double floor(double x)
 				if (i0 < 0)
 					i0 += 0x00100000>>j0;
 				i0 &= ~i;
-				i1=0;
+				i1 = 0;
 			}
 		}
 	} else if (j0 > 51) {
@@ -59,18 +59,18 @@ double floor(double x)
 		else
 			return x;   /* x is integral */
 	} else {
-		i = ((uint32_t)(0xffffffff))>>(j0-20);
+		i = (uint32_t)0xffffffff>>(j0-20);
 		if ((i1&i) == 0)
 			return x;   /* x is integral */
 		/* raise inexact flag */
 		if (huge+x > 0.0) {
 			if (i0 < 0) {
 				if (j0 == 20)
-					i0+=1;
+					i0++;
 				else {
 					j = i1+(1<<(52-j0));
 					if (j < i1)
-						i0 += 1; /* got a carry */
+						i0++; /* got a carry */
 					i1 = j;
 				}
 			}