@@ -133,7 +133,7 @@ function _generate_min_factors(limit)
133133 function min_factor (n)
134134 n < 4 && return n
135135 for i in 3 : 2 : isqrt (n)
136- n% i == 0 && return i
136+ n% i == 0 && return i
137137 end
138138 return n
139139 end
@@ -156,14 +156,14 @@ end
156156"""
157157 isprime(n::Integer) -> Bool
158158
159- Returns for values in the range of an INT64 variable: `true` if `n` is prime, and `false` otherwise
160- for bigger values: `true` if `n` is probably prime, and `false` otherwise (false-positive rate = 0.25^reps with reps=25 --> considerered safe)
159+ Returns for values in the range of an INT64 variable: `true` if `n` is prime, and `false` otherwise
160+ for bigger values: `true` if `n` is probably prime, and `false` otherwise (false-positive rate = 0.25^reps with reps=25 --> considered safe)
161161
162162 More detailed:
163163 for even numbers: returns deterministic and correct results
164164 for values in the range of an INT64 variable: returns deterministic and correct results (by Lookup-tables, trial-division, Miller-Rabin, Lucas-Test)
165- for bigger values: returns probabilistic resultsfrom GNU Multiple Precision Arithmetic Library
166-
165+ for bigger values: returns probabilistic resultsfrom GNU Multiple Precision Arithmetic Library
166+
167167```julia
168168julia> isprime(3)
169169true
@@ -273,7 +273,7 @@ function lucas_test(n::T) where T<:Signed
273273 if isodd (k>> b) == 1
274274 Qk = mod (Qk* Q, n)
275275 U, V = U + V, V + U* D
276- # adding n makes them even
276+ # adding n makes them even
277277 # so we can divide by 2 without causing problems
278278 isodd (U) && (U += n)
279279 isodd (V) && (V += n)
@@ -328,9 +328,9 @@ Base.isempty(f::FactorIterator) = f.n == 1
328328#
329329
330330"""
331- eachfactor(n::Integer)->FactorIterator
331+ eachfactor(n::Integer)->FactorIterator
332332Returns a lazy iterator of factors of `n` in `(factor, multiplicity)` pairs.
333- This can be very useful for computing multiplicitive functions since for small numbers (eg numbers with no factor `>2^16`),
333+ This can be very useful for computing multiplicative functions since for small numbers (e.g. numbers with no factor `>2^16`),
334334allocating the storage required for `factor(n)` can introduce significant overhead.
335335"""
336336eachfactor (n:: Integer ) = FactorIterator (n)
@@ -373,7 +373,7 @@ function iterate(f::FactorIterator{T}, state=(f.n, T(3))) where T
373373 _min_factor (p) == p || continue
374374 num_p = 0
375375 while true
376- q, r = divrem (n, T (p)) # T(p) so julia <1.9 uses fast divrem for `BigInt`
376+ q, r = divrem (n, T (p)) # T(p) so julia <1.9 uses fast ` divrem` for `BigInt`
377377 r == 0 || break
378378 num_p += 1
379379 n = q
0 commit comments