Skip to content

Commit 8e2b5c3

Browse files
author
oscarddssmith
committed
typo
1 parent 656d68c commit 8e2b5c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Primes.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ function isprime(n::Integer)
166166
# https://en.wikipedia.org/wiki/Miller–Rabin_primality_test
167167
# https://github.com/JuliaLang/julia/issues/11594
168168
n < 2 && return false
169-
trailing_zeros(n) > 1 && return n==2
169+
trailing_zeros(n) > 0 && return n==2
170170
if n < N_SMALL_FACTORS
171171
return _min_factor(n) == 1
172172
end
@@ -276,7 +276,7 @@ function factor!(n::T, h::AbstractDict{K,Int}) where {T<:Integer,K<:Integer}
276276
increment!(h, tz, 2)
277277
n >>= tz
278278
end
279-
if n <= N_SMALL_FACTORS
279+
if n <= N_SMALL_FACTORS
280280
while true
281281
n == 1 && return h
282282
if _min_factor(n)==1

0 commit comments

Comments
 (0)