diff --git a/Project.toml b/Project.toml index 525242f..c5aa179 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "Primes" uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" -version = "0.5.4" +version = "0.5.5" [deps] IntegerMathUtils = "18e54dd8-cb9d-406c-a71d-865a43cbb235" diff --git a/src/Primes.jl b/src/Primes.jl index 06e5ffd..6e5f781 100644 --- a/src/Primes.jl +++ b/src/Primes.jl @@ -346,7 +346,7 @@ function iterate(f::FactorIterator{T}, state=(f.n, T(3))) where T n == 0 && return (T(n), 1), (T(1), p) end tz = trailing_zeros(n) - tz>0 && return (T(2), tz), (n >> tz, p) + tz>0 && return (T(2), Int(tz)), (n >> tz, p) if n <= N_SMALL_FACTORS p = _min_factor(n) num_p = 1