projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6476dc
)
factor: a bit more simple isqrt
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 9 Apr 2017 22:28:26 +0000
(
00:28
+0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 9 Apr 2017 22:28:26 +0000
(
00:28
+0200)
function old new delta
isqrt_odd 87 80 -7
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/factor.c
patch
|
blob
|
history
diff --git
a/coreutils/factor.c
b/coreutils/factor.c
index 48833e10361a389cdf84632c427dd78a54635379..8ca3de71aafce2e11d9c60d535193bde95e194bb 100644
(file)
--- 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;
}