diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-04-10 00:28:26 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-04-10 00:28:26 +0200 |
| commit | bef17132175945a121992e3d13f0cc78ae722b1b (patch) | |
| tree | 53903a0349eecdbc7efcbe1cfce749211c1d88f4 /coreutils | |
| parent | c6476dca5484a9413d20dcbf887cc78055e6965f (diff) | |
| download | busybox-w32-bef17132175945a121992e3d13f0cc78ae722b1b.tar.gz busybox-w32-bef17132175945a121992e3d13f0cc78ae722b1b.tar.bz2 busybox-w32-bef17132175945a121992e3d13f0cc78ae722b1b.zip | |
factor: a bit more simple isqrt
function old new delta
isqrt_odd 87 80 -7
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
| -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 48833e103..8ca3de71a 100644 --- a/coreutils/factor.c +++ b/coreutils/factor.c | |||
| @@ -62,7 +62,7 @@ static inline half_t isqrt(wide_t N) | |||
| 62 | */ | 62 | */ |
| 63 | x = HALF_MAX; | 63 | x = HALF_MAX; |
| 64 | mask_2bits = TOPMOST_WIDE_BIT | (TOPMOST_WIDE_BIT >> 1); | 64 | mask_2bits = TOPMOST_WIDE_BIT | (TOPMOST_WIDE_BIT >> 1); |
| 65 | while (mask_2bits && !(N & mask_2bits)) { | 65 | while (!(N & mask_2bits)) { |
| 66 | x >>= 1; | 66 | x >>= 1; |
| 67 | mask_2bits >>= 2; | 67 | mask_2bits >>= 2; |
| 68 | } | 68 | } |
