remove dead code
This commit is contained in:
parent
592fadb6d7
commit
afd8fe57da
|
|
@ -16,24 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
||||
package sieve
|
||||
|
||||
func radicalUpdateMultiples(sieve []uint, p uint, n uint) {
|
||||
for q := p; ; q *= p {
|
||||
// rad(a*b) = rad(a) * rad(b) if gcd(a,b) = 1
|
||||
for i := 2 * q; i < n; i += q {
|
||||
if i%(p*q) != 0 {
|
||||
sieve[i] *= sieve[q]
|
||||
}
|
||||
}
|
||||
|
||||
if p*q >= n {
|
||||
break
|
||||
}
|
||||
|
||||
// rad(p^k) = rad(p)
|
||||
sieve[p*q] = sieve[q]
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Radical computes rad(k) for k=1 to n, where rad(n) is the radical of n.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue