summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b1c6822)
This saves two lines, fixes a whitespace issue, and removes a line
which was commented out for many years.
*/
__a_const static uint64_t int_sqrt(uint64_t x)
{
*/
__a_const static uint64_t int_sqrt(uint64_t x)
{
- uint64_t op, res, one = 1;
- op = x;
- res = 0;
+ uint64_t op = x, res = 0, one = 1;
one = one << (fls64(x) & ~one);
while (one != 0) {
if (op >= res + one) {
op = op - (res + one);
one = one << (fls64(x) & ~one);
while (one != 0) {
if (op >= res + one) {
op = op - (res + one);
-// PARA_NOTICE_LOG("sqrt(%llu) = %llu\n", x, res);