From: Denys Vlasenko Date: Sun, 9 Apr 2017 22:28:26 +0000 (+0200) Subject: factor: a bit more simple isqrt X-Git-Tag: 1_27_0~67 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bef17132175945a121992e3d13f0cc78ae722b1b;p=oweals%2Fbusybox.git factor: a bit more simple isqrt function old new delta isqrt_odd 87 80 -7 Signed-off-by: Denys Vlasenko --- diff --git a/coreutils/factor.c b/coreutils/factor.c index 48833e103..8ca3de71a 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; }