diff options
author | Denys Vlasenko | 2017-04-10 00:28:26 +0200 |
---|---|---|
committer | Denys Vlasenko | 2017-04-10 00:28:26 +0200 |
commit | bef17132175945a121992e3d13f0cc78ae722b1b (patch) | |
tree | 53903a0349eecdbc7efcbe1cfce749211c1d88f4 | |
parent | c6476dca5484a9413d20dcbf887cc78055e6965f (diff) | |
download | busybox-bef17132175945a121992e3d13f0cc78ae722b1b.zip busybox-bef17132175945a121992e3d13f0cc78ae722b1b.tar.gz |
factor: a bit more simple isqrt
function old new delta
isqrt_odd 87 80 -7
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | coreutils/factor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/factor.c b/coreutils/factor.c index 48833e1..8ca3de7 100644 --- a/coreutils/factor.c +++ b/coreutils/factor.c @@ -62,7 +62,7 @@ static inline half_t isqrt(wide_t N) */ x = HALF_MAX; mask_2bits = TOPMOST_WIDE_BIT | (TOPMOST_WIDE_BIT >> 1); - while (mask_2bits && !(N & mask_2bits)) { + while (!(N & mask_2bits)) { x >>= 1; mask_2bits >>= 2; } |