Skip to content

Commit 00ea174

Browse files
committed
fixup
1 parent ad4c66d commit 00ea174

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Primes.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,15 +387,15 @@ function iterate(f::FactorIterator{T}, state=(f.n, T(3))) where T
387387
return (n, 1), (T(1), n)
388388
end
389389
# check for n=root^r
390-
r = cld(ndigits(n, base=2), ndigits(Primes.PRIMES[end], base=2))
391-
root = inthroot(n, r)
390+
r = cld(ndigits(n, base=2), ndigits(N_SMALL_FACTORS, base=2))
391+
root = iroot(n, r)
392392
while r >= 2
393393
if root^r == n
394394
isprime(root) && return (root, r), (n, root+2)
395395

396396
end
397397
r -= 1
398-
root = inthroot(n, r)
398+
root = iroot(n, r)
399399
end
400400

401401
should_widen = T <: BigInt || widemul(n - 1, n - 1) typemax(n)

0 commit comments

Comments
 (0)