diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-04-13 10:51:13 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-04-13 10:51:13 +0200 |
commit | c054822027a4a6895bc95979c6c10ff5763c7c7e (patch) | |
tree | 20fb208d1e2bab309b76b007551b344e6ed34133 /coreutils | |
parent | 6c149f4d9afaed9edb75c88b784ad900c1f40700 (diff) | |
download | busybox-w32-c054822027a4a6895bc95979c6c10ff5763c7c7e.tar.gz busybox-w32-c054822027a4a6895bc95979c6c10ff5763c7c7e.tar.bz2 busybox-w32-c054822027a4a6895bc95979c6c10ff5763c7c7e.zip |
factor: tweak comments
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/factor.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/coreutils/factor.c b/coreutils/factor.c index 66d6a7cae..7adc2385a 100644 --- a/coreutils/factor.c +++ b/coreutils/factor.c | |||
@@ -58,7 +58,7 @@ static NOINLINE void factorize(wide_t N) | |||
58 | // unsigned count3; | 58 | // unsigned count3; |
59 | // unsigned count5; | 59 | // unsigned count5; |
60 | // unsigned count7; | 60 | // unsigned count7; |
61 | // ^^^^^^^^^^^^^^^ commented-out simple siving code (easier to grasp). | 61 | // ^^^^^^^^^^^^^^^ commented-out simple sieving code (easier to grasp). |
62 | // Faster sieving, using one word for potentially up to 6 counters: | 62 | // Faster sieving, using one word for potentially up to 6 counters: |
63 | // count upwards in each mask, counter "triggers" when it sets its mask to "100[0]..." | 63 | // count upwards in each mask, counter "triggers" when it sets its mask to "100[0]..." |
64 | // 10987654321098765432109876543210 - bits 31-0 in 32-bit word | 64 | // 10987654321098765432109876543210 - bits 31-0 in 32-bit word |
@@ -94,6 +94,8 @@ static NOINLINE void factorize(wide_t N) | |||
94 | * 18446744073709551601 = 53 348051774975651917 | 94 | * 18446744073709551601 = 53 348051774975651917 |
95 | * the last factor requires testing up to | 95 | * the last factor requires testing up to |
96 | * 589959129 - about 100 million iterations. | 96 | * 589959129 - about 100 million iterations. |
97 | * The slowest case (largest prime) for N < 2^64 is | ||
98 | * factor 18446744073709551557 (0xffffffffffffffc5). | ||
97 | */ | 99 | */ |
98 | max_factor = isqrt_odd(N); | 100 | max_factor = isqrt_odd(N); |
99 | // count3 = 3; | 101 | // count3 = 3; |