factor: a bit more simple isqrt
function old new delta isqrt_odd 87 80 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
c6476dca54
commit
bef1713217
@ -62,7 +62,7 @@ static inline half_t isqrt(wide_t N)
|
|||||||
*/
|
*/
|
||||||
x = HALF_MAX;
|
x = HALF_MAX;
|
||||||
mask_2bits = TOPMOST_WIDE_BIT | (TOPMOST_WIDE_BIT >> 1);
|
mask_2bits = TOPMOST_WIDE_BIT | (TOPMOST_WIDE_BIT >> 1);
|
||||||
while (mask_2bits && !(N & mask_2bits)) {
|
while (!(N & mask_2bits)) {
|
||||||
x >>= 1;
|
x >>= 1;
|
||||||
mask_2bits >>= 2;
|
mask_2bits >>= 2;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user