diff --git a/NEWS.md b/NEWS.md index dbe26e0f5fc443..44f1b22c2d0214 100644 --- a/NEWS.md +++ b/NEWS.md @@ -88,7 +88,7 @@ Breaking changes Library improvements -------------------- - * Most of the combinatorics functions have been moved from `Base` + * Most of the combinatorics functions have been moved from `Base` to the [Combinatorics.jl package](https://github.com/JuliaLang/Combinatorics.jl) ([#13897]). * Packages: @@ -162,6 +162,9 @@ Library improvements * Concatenating dense and sparse matrices now returns a sparse matrix ([#15172]). + * Prime number related functions have been moved from `Base` to the + [Primes.jl package](https://github.com/JuliaMath/Primes.jl) ([#16481]). + Deprecated or removed --------------------- diff --git a/doc/stdlib/math.rst b/doc/stdlib/math.rst index 708d5a426282ab..b803c170816871 100644 --- a/doc/stdlib/math.rst +++ b/doc/stdlib/math.rst @@ -1359,19 +1359,6 @@ Mathematical Functions Compute ``factorial(n)/factorial(k)``\ . -.. function:: factor(n) -> Dict - - .. Docstring generated from Julia source - - Compute the prime factorization of an integer ``n``\ . Returns a dictionary. The keys of the dictionary correspond to the factors, and hence are of the same type as ``n``\ . The value associated with each key indicates the number of times the factor appears in the factorization. - - .. doctest:: - - julia> factor(100) # == 2*2*5*5 - Dict{Int64,Int64} with 2 entries: - 2 => 2 - 5 => 2 - .. function:: gcd(x,y) .. Docstring generated from Julia source diff --git a/doc/stdlib/numbers.rst b/doc/stdlib/numbers.rst index 2b55a16149bab7..62d672eab244fb 100644 --- a/doc/stdlib/numbers.rst +++ b/doc/stdlib/numbers.rst @@ -455,40 +455,6 @@ Integers julia> trailing_ones(3) 2 -.. function:: isprime(x::Integer) -> Bool - - .. Docstring generated from Julia source - - Returns ``true`` if ``x`` is prime, and ``false`` otherwise. - - .. doctest:: - - julia> isprime(3) - true - -.. function:: isprime(x::BigInt, [reps = 25]) -> Bool - - .. Docstring generated from Julia source - - Probabilistic primality test. Returns ``true`` if ``x`` is prime; and ``false`` if ``x`` is not prime with high probability. The false positive rate is about ``0.25^reps``\ . ``reps = 25`` is considered safe for cryptographic applications (Knuth, Seminumerical Algorithms). - - .. doctest:: - - julia> isprime(big(3)) - true - -.. function:: primes([lo,] hi) - - .. Docstring generated from Julia source - - Returns a collection of the prime numbers (from ``lo``\ , if specified) up to ``hi``\ . - -.. function:: primesmask([lo,] hi) - - .. Docstring generated from Julia source - - Returns a prime sieve, as a ``BitArray``\ , of the positive integers (from ``lo``\ , if specified) up to ``hi``\ . Useful when working with either primes or composite numbers. - .. function:: isodd(x::Integer) -> Bool .. Docstring generated from Julia source